Browse Source

查询条件无效bug

lizhenhao 2 năm trước cách đây
mục cha
commit
276e8029dc

+ 4 - 4
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectRecords/mapper/xml/CwProjectRecordsMapper.xml

@@ -238,21 +238,21 @@
         ${ew.customSqlSegment}
         <if test="currentUser.id != '1'.toString">
             <if test="isBmzr == '0'.toString">
-                and a.create_by = #{currentUser.id} or a.id in (
+                and (a.create_by = #{currentUser.id} or a.id in (
                 select cw_pm.project_id
                 from cw_project_members cw_pm
                 where cw_pm.user_id = #{currentUser.id} and cw_pm.del_flag = '0' and cw_pm.status = '0'
-                )
+                ))
             </if>
             <if test="isBmzr == '1'.toString">
-                and a.create_by in (
+                and (a.create_by in (
                 select su.id from sys_user su where su.del_flag = '0' and su.office_id in
                 (select so.id from sys_office so where so.id = #{currentUser.officeDTO.id} or so.parent_ids like concat('%',#{currentUser.officeDTO.id},'%') and so.del_flag = '0')
                 ) or a.id in (
                 select cw_pm.project_id
                 from cw_project_members cw_pm
                 where cw_pm.user_id = #{currentUser.id} and cw_pm.del_flag = '0' and cw_pm.status = '0'
-                )
+                ))
             </if>
         </if>
         ORDER BY a.create_date DESC

+ 4 - 4
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/mapper/xml/CwProjectReportMapper.xml

@@ -94,21 +94,21 @@
         ${ew.customSqlSegment}
         <if test="currentUser.id != '1'.toString">
             <if test="isBmzr == '0'.toString">
-                and a.create_by = #{currentUser.id} or b.id in (
+                and (a.create_by = #{currentUser.id} or b.id in (
                 select cw_pm.project_id
                 from cw_project_members cw_pm
                 where cw_pm.user_id = #{currentUser.id} and cw_pm.del_flag = '0' and cw_pm.status = '0'
-                )
+                ))
             </if>
             <if test="isBmzr == '1'.toString">
-                and a.create_by in (
+                and (a.create_by in (
                 select su.id from sys_user su where su.del_flag = '0' and su.office_id in
                 (select so.id from sys_office so where so.id = #{currentUser.officeDTO.id} or so.parent_ids like concat('%',#{currentUser.officeDTO.id},'%') and so.del_flag = '0')
                 ) or b.id in (
                 select cw_pm.project_id
                 from cw_project_members cw_pm
                 where cw_pm.user_id = #{currentUser.id} and cw_pm.del_flag = '0' and cw_pm.status = '0'
-                )
+                ))
             </if>
         </if>
         ORDER BY a.create_date DESC

+ 4 - 4
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReportArchive/mapper/xml/CwProjectReportArchiveMapper.xml

@@ -236,21 +236,21 @@
         ${ew.customSqlSegment}
         <if test="currentUser.id != '1'.toString">
             <if test="isBmzr == '0'.toString">
-                and cw_pa.create_by = #{currentUser.id} or cw_pa.project_id in (
+                and (cw_pa.create_by = #{currentUser.id} or cw_pa.project_id in (
                 select cw_pm.project_id
                 from cw_project_members cw_pm
                 where cw_pm.user_id = #{currentUser.id} and cw_pm.del_flag = '0' and cw_pm.status = '0'
-                )
+                ))
             </if>
             <if test="isBmzr == '1'.toString">
-                and cw_pa.create_by in (
+                and (cw_pa.create_by in (
                 select su.id from sys_user su where su.del_flag = '0' and su.office_id in
                 (select so.id from sys_office so where so.id = #{currentUser.officeDTO.id} or so.parent_ids like concat('%',#{currentUser.officeDTO.id},'%') and so.del_flag = '0')
                 ) or cw_pa.project_id in (
                 select cw_pm.project_id
                 from cw_project_members cw_pm
                 where cw_pm.user_id = #{currentUser.id} and cw_pm.del_flag = '0' and cw_pm.status = '0'
-                )
+                ))
             </if>
         </if>
         ORDER BY cw_pa.create_date DESC