xuhy
2025-02-21 0e416914d19635d62f4ef7b5be74c1ed6b7ea24e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?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>