hanfucheng 7 月之前
父节点
当前提交
6f8843cc9a
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/main/resources/mapper/lawenforcement/LawenforcementViewMapper.xml

+ 4 - 1
src/main/resources/mapper/lawenforcement/LawenforcementViewMapper.xml

@@ -61,12 +61,15 @@
             GROUP BY dept_name) e ON e.dept_name = a.dept_name
         </if>
         <if test="mark != null and mark == 'person'">
-            LEFT JOIN lawenforcement_person p ON p.record_id = a.id AND main_person = 1
+            LEFT JOIN lawenforcement_person p ON p.record_id = a.id
         </if>
         <if test="mark != null and mark == 'item'">
             LEFT JOIN lawenforcement_subitem s ON s.record_id = a.id
         </if>
         <where>
+            <if test="mark != null and mark == 'person'">
+                AND main_person = 1
+            </if>
             <if test="deptName != null and deptName != ''">
                 AND a.dept_name LIKE CONCAT('%', #{deptName}, '%')
             </if>