package com.xjrsoft.module.student.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.yulichang.base.MPJBaseMapper;
import com.xjrsoft.module.student.entity.PbSemesterConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
* @title: 攀宝学期对应
* @Author zsz
* @Date: 2024-03-18
* @Version 1.0
*/
@Mapper
public interface PbSemesterConfigMapper extends MPJBaseMapper<PbSemesterConfig> {

    @Select("SELECT t1.beltcode FROM pb_semester_config t1 " +
            "INNER JOIN base_semester t2 ON t1.base_semester_id = t2.id " +
            "WHERE t2.delete_mark = 0 ORDER BY t2.start_date DESC LIMIT 1")
    String getLastBeltcode();
}
