package com.srs.dormitory.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.srs.dormitory.mapper.DmsLiveDetailMapper;
import com.srs.dormitory.domain.DmsLiveDetail;
import com.srs.dormitory.service.IDmsLiveDetailService;

/**
 * 住宿详情Service业务层处理
 *
 * @author srs
 * @date 2024-02-22
 */
@Service
public class DmsLiveDetailServiceImpl extends ServiceImpl<DmsLiveDetailMapper,DmsLiveDetail> implements IDmsLiveDetailService {
    @Autowired
    private DmsLiveDetailMapper dmsLiveDetailMapper;

    /**
     * 查询住宿详情
     *
     * @param id 住宿详情主键
     * @return 住宿详情
     */
    @Override
    public DmsLiveDetail selectDmsLiveDetailById(Long id) {
        return dmsLiveDetailMapper.selectDmsLiveDetailById(id);
    }

    /**
     * 查询住宿详情列表
     *
     * @param dmsLiveDetail 住宿详情
     * @return 住宿详情
     */
    @Override
    public List<DmsLiveDetail> selectDmsLiveDetailList(DmsLiveDetail dmsLiveDetail) {
        return dmsLiveDetailMapper.selectDmsLiveDetailList(dmsLiveDetail);
    }

    /**
     * 新增住宿详情
     *
     * @param dmsLiveDetail 住宿详情
     * @return 结果
     */
    @Override
    public int insertDmsLiveDetail(DmsLiveDetail dmsLiveDetail) {
            return dmsLiveDetailMapper.insertDmsLiveDetail(dmsLiveDetail);
    }

    /**
     * 修改住宿详情
     *
     * @param dmsLiveDetail 住宿详情
     * @return 结果
     */
    @Override
    public int updateDmsLiveDetail(DmsLiveDetail dmsLiveDetail) {
        return dmsLiveDetailMapper.updateDmsLiveDetail(dmsLiveDetail);
    }

    /**
     * 批量删除住宿详情
     *
     * @param ids 需要删除的住宿详情主键
     * @return 结果
     */
    @Override
    public int deleteDmsLiveDetailByIds(Long[] ids) {
        return dmsLiveDetailMapper.deleteDmsLiveDetailByIds(ids);
    }

    /**
     * 删除住宿详情信息
     *
     * @param id 住宿详情主键
     * @return 结果
     */
    @Override
    public int deleteDmsLiveDetailById(Long id) {
        return dmsLiveDetailMapper.deleteDmsLiveDetailById(id);
    }
}
