package com.srs.dormitory.mapper;

import java.util.List;

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

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

    /**
     * 查询外宿申请
     *
     * @param processInstanceId 外宿申请流程id
     * @return 外宿申请
     */
    public DmsOutsideAccommodationApply selectDmsOutsideAccommodationApplyByProcessInstanceId(String processInstanceId);

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

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

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

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

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

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

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