package com.srs.comprehensive.mapper;

import com.srs.comprehensive.domain.GraduateStudentNews;
import com.srs.comprehensive.domain.SaveStudent;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
/**
 * 毕业生信息管理mapper
 * 邵政文
 * @date 2025-06-28
 **/
public interface GraduateTextMapper {

    /**
     * 添加毕业生信息(主)
     * @return
     * @author moTakeText
     * 邵政文
     * @date 2025-06-29
     **/
    void inserts(GraduateStudentNews student);

    /**
     * 根据学生学号查询毕业生信息
     * @return GraduateStudentNews
     * @author studentCode
     * 邵政文
     * @date 2025-06-29
     **/
    @Select("SELECT * FROM srs_graduate_studentinfo WHERE student_code = #{studentCode}")
    GraduateStudentNews selectByStudentCode(String studentCode);

    /**
     * 查询毕业生列表信息
     * @return List<GraduateStudentNews>
     * @author student
     * 邵政文
     * @date 2025-07-01
     **/
    List<GraduateStudentNews> selectGraduateList(GraduateStudentNews student);

    /**
     * 查询班级信息
     * @return String
     * @author classId
     * 邵政文
     * @date 2025-07-02
     **/
    String selectGraduateClassData(Integer classId);

    /**
     * 根据id查询毕业生信息
     * @return GraduateStudentNews
     * @author id
     * 邵政文
     * @date 2025-07-02
     **/
    SaveStudent selectByStudentById(Long id);

    /**
     * 添加毕业生信息
     * @return int
     * @author graduateStudent
     * 邵政文
     * @date 2025-07-02
     **/
    int insertGraduateStudent(GraduateStudentNews graduateStudent);

    /**
     * 修改毕业生信息
     * @return int
     * @author graduateStudent
     * 邵政文
     * @date 2025-07-02
     **/
    int updateGraduateStudentByGraduateId(GraduateStudentNews graduateStudent);

    /**
     * 通过学号查询毕业生学年信息
     * @return int
     * @author graduateStudent
     * 邵政文
     * @date 2025-07-03
     **/
    List<Integer> selectStuYearByStudentCode(String studentCode);

    /**
     * 根据ids批量查询毕业生信息
     * @return 毕业生信息列表
     * @author ids
     * 邵政文
     * @date 2025-07-02
     **/
    List<SaveStudent> graduateByIdsList(Long[] ids);

}
