mitao
2025-02-25 97acbe77e0c6ca4e719563f19dfad0541e428ddb
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml
@@ -35,6 +35,7 @@
               sc.completion_username,
               sc.completion_user_phone,
               sc.closing_time,
               sc.over_time_days,
               sc.latitude,
               sc.longitude,
               scar.audit_type,
@@ -44,7 +45,7 @@
               scar.videos,
               scar.create_time AS reportTime,
               scar.system_user_id,
               scar.name        AS reportName,
               scar.reporter,
               scar.department_name,
               scar.department_id
        FROM sgsb_complaint sc
@@ -53,6 +54,7 @@
            <if test="query.type ==null">
                (scar.audit_type = 1 AND scar.audit_status = 1)
                OR (scar.audit_type = 2 AND scar.audit_status = 2)
                OR (sc.status IS NOT NULL)
            </if>
            <if test="isSuperior == 1 and targetId != null">
                AND sc.superior_id = #{targetId}
@@ -105,6 +107,7 @@
               sc.completion_username,
               sc.completion_user_phone,
               sc.closing_time,
               sc.over_time_days,
               sc.latitude,
               sc.longitude,
               scar.audit_type,
@@ -114,13 +117,15 @@
               scar.videos,
               scar.create_time AS reportTime,
               scar.system_user_id,
               scar.name        AS reportName,
               scar.reporter,
               scar.department_name,
               scar.department_id,
               scar.comment
               scar.comment,
               su.nick_name,
               su.phone
        FROM sgsb_complaint sc
            LEFT JOIN sys_user su ON su.user_id = sc.create_by
                 LEFT JOIN sgsb_complaint_audit_record scar ON scar.complaint_id = sc.id AND scar.latest_flag = 1
        WHERE sc.id = #{id}
        <where>
            sc.id = #{id}
        </where>