diff --git a/src/main/resources/sql/mapper/user-mapper.xml b/src/main/resources/sql/mapper/user-mapper.xml index 9c9f400..a94c2f1 100644 --- a/src/main/resources/sql/mapper/user-mapper.xml +++ b/src/main/resources/sql/mapper/user-mapper.xml @@ -60,29 +60,15 @@ SELECT USER_ID , 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 - FROM TB_USER A + FROM TB_USER AND ${by} LIKE CONCAT('%', #{term}, '%') USER_ID IN (#{userID}) AND STTS != 'D' @@ -99,12 +85,12 @@ SELECT USER_ID +AND USER_ID = #{userID} +AND USER_ACNT = #{account} + AND NSTT_CD = #{institute} - +/* 사용자 정보 등록(userMapper.insertUser) */ SELECT LPAD(NVL(MAX(USER_ID) + 1, 1), 10, '0') NEW_ID FROM TB_USER -/* 사용자 정보 등록(userMapper.insertUser) */ INSERT INTO TB_USER ( USER_ID , USER_ACNT @@ -128,7 +114,6 @@ INSERT INTO TB_USER ( , GRP_ID , ORG_ID , NSTT_CD - , DEPT_CD , CRTFC_DN , LOCK_YN , LOCK_CNT @@ -162,7 +147,6 @@ INSERT INTO TB_USER ( , #{groupID} , #{orgID} , #{institute} - , #{deptCode} , #{certificateDn} , 'N' , 0 @@ -196,7 +180,6 @@ UPDATE TB_USER SET , GRP_ID = #{groupID} , ORG_ID = #{orgID} , NSTT_CD = #{institute} - , DEPT_CD = #{deptCode} , CRTFC_DN = #{certificateDn} , STTS = #{status} , MDFCN_DT = @@ -204,8 +187,8 @@ UPDATE TB_USER SET WHERE USER_ID = #{id} /* 비밀번호 변경(userMapper.changePassword) */ -UPDATE TB_USER SET - PASSWD = CASE USER_ID +UPDATE TB_USER + SET PASSWD = CASE USER_ID WHEN #{userPassword.userID} THEN #{userPassword.password} ELSE PASSWD END , MDFCN_DT = @@ -223,7 +206,7 @@ UPDATE TB_USER SET , LOCK_DT = NULL , MDFCN_DT = , MDFR = #{currentUser.id} - WHERE USER_ID IN (#{userID}) + WHERE USER_ID IN (#{userID}) /* 사용자 상태 변경(userMapper.setStatus) */