wjli
2024-03-18 84fd23e5e865bd5529441a0c318809a00362f44c
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
40
41
42
43
44
45
46
47
48
49
50
51
<?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="cn.exrick.xboot.your.mapper.OrderTask2Mapper">
 
    <select id="getTask2Images" resultType="cn.exrick.xboot.your.entity.OrderTask2Imgs">
        SELECT
            a.code as code,
            a.area_id as areaId,
            b.name as areaName,
            a.area_section_id as areaSectionId,
            c.name as areaSectionName,
            a.car_id as carId,
            d.car_no as carNo,
            a.customer_id as customerId,
            a.customer_name as customerName,
            a.customer_receive_id as customerReceiveId,
            a.update_time as receiveTime,
            e.name as customerReceiveName,
            a.user_id as userId,
            a.user_name as userName,
            e.img as receiveImg,
            a.img as imgs,
            a.send_date as sendDate,
            a.order_date as orderDate
        FROM t_order_task2 a,t_area b,t_area_ection c,t_car d,t_customer_receive e
        WHERE a.status = 1
        <if test="bo.sendDateStart != null and bo.sendDateStart != ''">
            AND send_date >= #{bo.sendDateStart}
        </if>
        <if test="bo.sendDateEnd != null and bo.sendDateEnd != ''">
            AND send_date &lt;= #{bo.sendDateEnd}
        </if>
        <if test="bo.userName != null and bo.userName != ''" >
            AND  a.user_name = #{bo.userName}
        </if>
        <if test="bo.carNo != null and bo.carNo != ''" >
            AND  d.car_no = #{bo.carNo}
        </if>
        <if test="bo.customerName != null and bo.customerName != ''" >
            AND a.customer_name like CONCAT ('%',#{bo.customerName},'%')
        </if>
 
          and a.img is not null
          and a.area_id = b.id
          and a.area_section_id = c.id
          and a.car_id = d.id
          and a.customer_receive_id = e.id
        order by a.order_date desc
    </select>
 
</mapper>