liuyu
21 小时以前 6eef0b6730d940ef44e0f66dd8e7d178f1cd2d1f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package jnpf.tmsMapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.tmsEntity.TmsQuestionEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
@Mapper
public interface TmsQuestionMapper extends BaseMapper<TmsQuestionEntity> {
 
    /**
     * 当年最大试题编号(含已逻辑删除,避免流水号回退复用)。
     * 格式:yy + 4 位流水,如 260001。
     */
    @Select("SELECT MAX(question_no) FROM tms_question WHERE question_no LIKE CONCAT(#{prefix}, '%') AND LENGTH(question_no) = 6")
    String selectMaxQuestionNo(@Param("prefix") String prefix);
}