<?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.stylefeng.guns.modular.system.dao.TDriverFacialFailMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TDriverFacialFail">
|
<id column="id" property="id" />
|
<result column="driverId" property="driverId" />
|
<result column="city" property="city" />
|
<result column="cityCode" property="cityCode" />
|
<result column="facialPicture" property="facialPicture" />
|
<result column="createTime" property="createTime" />
|
<result column="isDelete" property="isDelete" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, driverId, city, cityCode, facialPicture, createTime, isDelete
|
</sql>
|
<select id="getDriverFacialFailList" resultType="java.util.Map">
|
SELECT tdff.id, tdff.driverId, tdff.city, tdff.cityCode, tdff.facialPicture, tdff.createTime, tdff.isDelete ,td.`name` AS driverName,td.phone AS driverPhone
|
FROM t_driver_facial_fail tdff
|
left join t_driver td on td.id = tdff.driverId
|
<where>
|
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
|
AND (tdff.createTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
|
</if>
|
<if test="name != null and name != ''">
|
AND td.name LIKE CONCAT('%',#{name},'%')
|
</if>
|
<if test="phone != null and phone != ''">
|
AND td.phone LIKE CONCAT('%',#{phone},'%')
|
</if>
|
AND tdff.isDelete = 1
|
</where>
|
order by tdff.createTime desc
|
</select>
|
|
</mapper>
|