diff --git a/src/main/resources/sql/mapper/base/user-mapper.xml b/src/main/resources/sql/mapper/base/user-mapper.xml index 05f0c6b..fb66328 100644 --- a/src/main/resources/sql/mapper/base/user-mapper.xml +++ b/src/main/resources/sql/mapper/base/user-mapper.xml @@ -76,7 +76,8 @@ SELECT USER_ID FROM TB_SGG A LEFT OUTER JOIN TB_DEPT B ON A.SGG_CD = B.SGG_CD AND A.INST_CD = B.INST_CD - ) B ON A.NSTT_CD = B.INST_CD OR (A.NSTT_CD = B.INST_CD AND A.DEPT_CD = B.DEPT_CD) + AND A.USE_YN = 'Y' AND B.USE_YN = 'Y' + ) B ON A.NSTT_CD = B.INST_CD AND A.DEPT_CD = B.DEPT_CD AND ${by} LIKE CONCAT('%', #{term}, '%') USER_ID IN (#{userID}) AND STTS != 'D'