소스 검색

优化删除问题

java110 5 년 전
부모
커밋
19a79c5293
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      java110-db/src/main/resources/mapper/user/OrgStaffRelServiceDaoImplMapper.xml

+ 4 - 2
java110-db/src/main/resources/mapper/user/OrgStaffRelServiceDaoImplMapper.xml

@@ -81,8 +81,10 @@
         from u_org_staff_rel t,u_org uo,u_user uu
         where t.org_id = uo.org_id
         and t.staff_id = uu.user_id
-        and uu.status_cd = '0'
-        and uo.status_cd = '0'
+        <if test="statusCd ==null or relId != '1'">
+            and uu.status_cd = '0'
+            and uo.status_cd = '0'
+        </if>
         <if test="relId !=null and relId != ''">
             and t.rel_id= #{relId}
         </if>