From d4ff734685adafce067f67b46cd31bdb97392d45 Mon Sep 17 00:00:00 2001 From: leebj Date: Fri, 28 Jun 2024 10:47:55 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=BF=BC=EB=A6=AC=20=EC=88=98=EC=A0=95(=EC=8B=9C?= =?UTF-8?q?=EA=B5=B0=EA=B5=AC=EB=AA=85,=EA=B8=B0=EA=B4=80=EB=AA=85,?= =?UTF-8?q?=EB=B6=80=EC=84=9C=EB=AA=85=20=EC=B6=94=EA=B0=80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/sql/mapper/base/user-mapper.xml | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/src/main/resources/sql/mapper/base/user-mapper.xml b/src/main/resources/sql/mapper/base/user-mapper.xml index aafeedb9..019658eb 100644 --- a/src/main/resources/sql/mapper/base/user-mapper.xml +++ b/src/main/resources/sql/mapper/base/user-mapper.xml @@ -41,49 +41,49 @@ -SELECT USER_ID - , USER_ACNT - , USER_NM - , PASSWD_HINT - , PASSWD_NSR - , EMP_NO - , RSDNT_NO - , GENDER - , BRDT - , AREA_NO - , ZIP - , ADDR - , DADDR - , TELNO - , MBL_TELNO - , FXNO - , EML_ADRS - , POS_NM - , GRP_ID - , ORG_ID - , (SELECT SGG_NM FROM TB_SGG WHERE SGG_CD = A.ORG_ID) AS SGG_NM - , DEPT_CD - , (CASE - WHEN A.DEPT_CD = 'default' - THEN '기본 부서' - ELSE (SELECT DEPT_NM FROM TB_DEPT WHERE DEPT_CD = A.DEPT_CD) - END - ) AS DEPT_NM - , NSTT_CD - , (CASE - WHEN A.NSTT_CD = 'default' - THEN '기본 기관' - ELSE (SELECT INST_NM FROM TB_SGG WHERE INST_CD = A.NSTT_CD AND SGG_CD = A.ORG_ID) - END - ) AS NSTT_NM - , CRTFC_DN - , LOCK_YN - , LOCK_CNT - , LOCK_DT - , REG_DT - , STTS - , (SELECT GET_CODE_NM('CMN004', STTS) FROM DUAL) AS STTS_NM +SELECT A.USER_ID + , A.USER_ACNT + , A.USER_NM + , A.PASSWD_HINT + , A.PASSWD_NSR + , A.EMP_NO + , A.RSDNT_NO + , A.GENDER + , A.BRDT + , A.AREA_NO + , A.ZIP + , A.ADDR + , A.DADDR + , A.TELNO + , A.MBL_TELNO + , A.FXNO + , A.EML_ADRS + , A.POS_NM + , A.GRP_ID + , A.ORG_ID + , A.CRTFC_DN + , A.LOCK_YN + , A.LOCK_CNT + , A.LOCK_DT + , A.REG_DT + , A.STTS + , (SELECT GET_CODE_NM('CMN004', A.STTS) FROM DUAL) AS STTS_NM + , A.NSTT_CD AS NSTT_CD + , (CASE WHEN A.NSTT_CD = 'default' THEN '기본 기관' ELSE B.INST_NM END) AS NSTT_NM + , A.NSTT_CD AS INST_CD + , (CASE WHEN A.NSTT_CD = 'default' THEN '기본 기관' ELSE B.INST_NM END) AS INST_NM + , A.DEPT_CD AS DEPT_CD + , (CASE WHEN A.DEPT_CD = 'default' THEN '기본 부서' ELSE B.DEPT_NM END) AS DEPT_NM + , B.SGG_CD AS SGG_CD + , B.SGG_NM AS SGG_NM FROM TB_USER A + LEFT OUTER JOIN ( + SELECT A.SGG_CD, SGG_NM, A.INST_CD, INST_NM, DEPT_CD, DEPT_NM + FROM TB_SGG A LEFT OUTER JOIN TB_DEPT B + ON A.SGG_CD = B.SGG_CD + AND A.INST_CD = B.INST_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})