<?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.noncoalmine.mapper.IdentificationRecordMapper">
|
<select id="getList" resultType="com.gkhy.exam.noncoalmine.entity.IdentificationRecord">
|
SELECT
|
*
|
FROM
|
identification_record
|
WHERE
|
del_flag = 0
|
<if test="query.name != null and query.name != ''">
|
and name like concat('%', #{query.name}, '%')
|
</if>
|
<if test="query.idCard != null and query.idCard != ''">
|
and id_card = #{query.idCard}
|
</if>
|
<if test="query.isCm != null">
|
and is_cm = #{query.isCm}
|
</if>
|
<if test="query.startTime != null"><!-- 开始时间检索 -->
|
and date_format(compare_time,'%y-%m-%d') >= date_format(#{query.startTime},'%y-%m-%d')
|
</if>
|
<if test="query.endTime != null"><!-- 结束时间检索 -->
|
and date_format(compare_time,'%y-%m-%d') <= date_format(#{query.endTime},'%y-%m-%d')
|
</if>
|
order by compare_time desc
|
|
</select>
|
</mapper>
|