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.DmsOutsideAccommodationApprovalMapper;
import com.srs.dormitory.domain.DmsOutsideAccommodationApproval;
import com.srs.dormitory.service.IDmsOutsideAccommodationApprovalService;

/**
 * 外宿申请审批记录Service业务层处理
 *
 * @author srs
 * @date 2025-12-05
 */
@Service
public class DmsOutsideAccommodationApprovalServiceImpl extends ServiceImpl<DmsOutsideAccommodationApprovalMapper,DmsOutsideAccommodationApproval> implements IDmsOutsideAccommodationApprovalService {
    @Autowired
    private DmsOutsideAccommodationApprovalMapper dmsOutsideAccommodationApprovalMapper;

    /**
     * 查询外宿申请审批记录
     *
     * @param id 外宿申请审批记录主键
     * @return 外宿申请审批记录
     */
    @Override
    public DmsOutsideAccommodationApproval selectDmsOutsideAccommodationApprovalById(Long id) {
        return dmsOutsideAccommodationApprovalMapper.selectDmsOutsideAccommodationApprovalById(id);
    }

    /**
     * 查询外宿申请审批记录列表
     *
     * @param dmsOutsideAccommodationApproval 外宿申请审批记录
     * @return 外宿申请审批记录
     */
    @Override
    public List<DmsOutsideAccommodationApproval> selectDmsOutsideAccommodationApprovalList(DmsOutsideAccommodationApproval dmsOutsideAccommodationApproval) {
        return dmsOutsideAccommodationApprovalMapper.selectDmsOutsideAccommodationApprovalList(dmsOutsideAccommodationApproval);
    }

    /**
     * 新增外宿申请审批记录
     *
     * @param dmsOutsideAccommodationApproval 外宿申请审批记录
     * @return 结果
     */
    @Override
    public int insertDmsOutsideAccommodationApproval(DmsOutsideAccommodationApproval dmsOutsideAccommodationApproval) {
            return dmsOutsideAccommodationApprovalMapper.insertDmsOutsideAccommodationApproval(dmsOutsideAccommodationApproval);
    }

    /**
     * 修改外宿申请审批记录
     *
     * @param dmsOutsideAccommodationApproval 外宿申请审批记录
     * @return 结果
     */
    @Override
    public int updateDmsOutsideAccommodationApproval(DmsOutsideAccommodationApproval dmsOutsideAccommodationApproval) {
        return dmsOutsideAccommodationApprovalMapper.updateDmsOutsideAccommodationApproval(dmsOutsideAccommodationApproval);
    }

    /**
     * 批量删除外宿申请审批记录
     *
     * @param ids 需要删除的外宿申请审批记录主键
     * @return 结果
     */
    @Override
    public int deleteDmsOutsideAccommodationApprovalByIds(Long[] ids) {
        return dmsOutsideAccommodationApprovalMapper.deleteDmsOutsideAccommodationApprovalByIds(ids);
    }

    /**
     * 删除外宿申请审批记录信息
     *
     * @param id 外宿申请审批记录主键
     * @return 结果
     */
    @Override
    public int deleteDmsOutsideAccommodationApprovalById(Long id) {
        return dmsOutsideAccommodationApprovalMapper.deleteDmsOutsideAccommodationApprovalById(id);
    }
}
