package com.srs.flowable.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.srs.common.doman.vo.TeacherVo;
import com.srs.flowable.domain.DormitoryStudent;
import com.srs.flowable.domain.OutsideAccommodationApply;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 外宿申请Mapper接口
 *
 * @author srs
 * @date 2025-12-05
 */
public interface OutsideAccommodationApplyMapper extends BaseMapper<OutsideAccommodationApply> {
    /**
     * 查询外宿申请
     *
     * @param id 外宿申请主键
     * @return 外宿申请
     */
    public OutsideAccommodationApply selectDmsOutsideAccommodationApplyById(Long id);

    /**
     * 查询外宿申请列表
     *
     * @param outsideAccommodationApply 外宿申请
     * @return 外宿申请集合
     */
    List<OutsideAccommodationApply> selectDmsOutsideAccommodationApplyList(OutsideAccommodationApply outsideAccommodationApply);

    //    <!--  根据学号查询辅导员信息  -->
    public TeacherVo getCounselorInfo(String stuNo);

    /**
     * 获取审批用户信息
     * @param roleName
     * @return
     * 邵政文
     */
    List<TeacherVo> getShenDataInfo(String roleName);

    /**
     * 查询外宿申请
     *
     * @param studentName 学生姓名
     * @return 应征入伍保留学籍申请
     */
    public OutsideAccommodationApply getAccommodationByStuNameAndStuNo(@Param("studentName") String studentName, @Param("studentNo") String studentNo);

    /**
     * 新增外宿申请
     *
     * @param outsideAccommodationApply 外宿申请
     * @return 结果
     */
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int insertDmsOutsideAccommodationApply(OutsideAccommodationApply outsideAccommodationApply);

    /**
     * 修改外宿申请
     *
     * @param dmsOutsideAccommodationApply 外宿申请
     * @return 结果
     */
    int updateDmsOutsideAccommodationApply(OutsideAccommodationApply outsideAccommodationApply);

    /*根据学号更新学生住宿信息*/
    boolean updateSrsDormitoryStudent(DormitoryStudent dormitoryStudent);

    /**
     * 删除外宿申请
     *
     * @param id 外宿申请主键
     * @return 结果
     */
    int deleteDmsOutsideAccommodationApplyById(Long id);

    /**
     * 批量删除外宿申请
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteDmsOutsideAccommodationApplyByIds(Long[] ids);
}
