liujie
昨天 ee6a2aa9e265f498ce7df9c603d3148487c0b1e8
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
<?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.panzhihua.sangeshenbian.dao.ComplaintRejectMapper">
 
 
 
 
 
 
 
 
    <select id="getComplaintRejectList" resultType="com.panzhihua.sangeshenbian.model.vo.ComplaintRejectVo">
        select t3.reject_reason remark,t3.audit_time examineTime,t2.id complaintId,t2.serial_number serialNumber,t2.report_user_name reportUserName,t2.status,
               t2.report_user_phone reportUserPhone,t3.auditor_name examineUserName,t3.create_time applyTime,t3.apply_name applyUserName
        from sgsb_complaint_audit_record t3
        left join sgsb_complaint t2 on t3.complaint_id = t2.id
        <where>
            t3.audit_status=2
            <if test="query.serialNumber != null and query.serialNumber != ''">
                and t2.serial_number = #{query.serialNumber}
            </if>
            <if test="query.reportUserName != null and query.reportUserName != ''">
                and t2.report_user_name like concat("%",#{query.reportUserName},"%")
            </if>
            <if test="query.reportUserPhone != null and query.reportUserPhone != ''">
                and t2.report_user_phone like concat("%",#{query.reportUserPhone},"%")
            </if>
            <if test="query.applyUserName != null and query.applyUserName != ''">
                and t3.apply_name like concat("%",#{query.applyUserName},"%")
            </if>
            <if test="query.examineUserName != null and query.examineUserName != ''">
                and t3.auditor_name like concat("%",#{query.examineUserName},"%")
            </if>
            <if test="applyStartTime !=null">
                and t3.create_time between #{applyStartTime} and #{applyEndTime}
            </if>
            <if test="examineStartTime !=null">
                and t3.audit_time between #{examineStartTime} and #{examineEndTime}
            </if>
 
        </where>
        order by t3.create_time desc
    </select>
</mapper>