<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.gkhy.exam.institutionalaccess.mapper.ThBatchMapper">
|
<select id="listByPage" resultType="com.gkhy.exam.institutionalaccess.model.vo.ThBatchVO">
|
select * from th_batch where del_flag = 0
|
<if test="query.institutionId != null">
|
and institution_id = #{query.institutionId}
|
</if>
|
<if test="query.batchName != null and query.batchName != ''">
|
and batch_name like concat('%', #{query.batchaName}, '%')
|
</if>
|
<if test="query.startTime != null"><!-- 开始时间检索 -->
|
and date_format(d.create_time,'%y-%m-%d') >= date_format(#{query.startTime},'%y-%m-%d')
|
</if>
|
<if test="query.endTime != null"><!-- 结束时间检索 -->
|
and date_format(d.create_time,'%y-%m-%d') <= date_format(#{query.endTime},'%y-%m-%d')
|
</if>
|
|
</select>
|
|
</mapper>
|