package jnpf.tmsMapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import jnpf.tmsEntity.TmsPaperEntity;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
@Mapper
|
public interface TmsPaperMapper extends BaseMapper<TmsPaperEntity> {
|
|
/**
|
* 当年最大试卷编号(含已逻辑删除,避免流水号回退复用)。
|
* 格式:yy + 4 位流水,如 260001。
|
*/
|
@Select("SELECT MAX(paper_no) FROM tms_paper WHERE paper_no LIKE CONCAT(#{prefix}, '%') AND LENGTH(paper_no) = 6")
|
String selectMaxPaperNo(@Param("prefix") String prefix);
|
}
|