비밀번호 변경 관련 수정

master
mjkhan21 5 months ago
parent 3ffe2e6bb8
commit 95ddf1a469

@ -60,29 +60,15 @@ SELECT USER_ID
, POS_NM , POS_NM
, GRP_ID , GRP_ID
, ORG_ID , ORG_ID
, (SELECT SGG_NM FROM TB_SGG WHERE SGG_CD = A.ORG_ID) AS SGG_NM
, DEPT_CD , 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 , 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 , CRTFC_DN
, LOCK_YN , LOCK_YN
, LOCK_CNT , LOCK_CNT
, LOCK_DT , LOCK_DT
, REG_DT , REG_DT
, STTS , STTS
, (SELECT GET_CODE_NM('CMN004', STTS) FROM DUAL) AS STTS_NM FROM TB_USER
FROM TB_USER A
<where><if test="by != null and term != null">AND ${by} LIKE CONCAT('%', #{term}, '%')</if> <where><if test="by != null and term != null">AND ${by} LIKE CONCAT('%', #{term}, '%')</if>
<if test="userIDs != null">USER_ID IN (<foreach collection="userIDs" item="userID" separator=",">#{userID}</foreach>)</if> <if test="userIDs != null">USER_ID IN (<foreach collection="userIDs" item="userID" separator=",">#{userID}</foreach>)</if>
<if test="status == null and userIDs == null">AND STTS != 'D'</if> <if test="status == null and userIDs == null">AND STTS != 'D'</if>
@ -99,12 +85,12 @@ SELECT USER_ID
<select id="getUser" parameterType="map" resultMap="userRow">/* 사용자 계정 가져오기(userMapper.getUser) */ <select id="getUser" parameterType="map" resultMap="userRow">/* 사용자 계정 가져오기(userMapper.getUser) */
SELECT * SELECT *
FROM TB_USER FROM TB_USER
WHERE USER_ACNT = #{account} <where><if test="userID != null">AND USER_ID = #{userID}</if>
AND NSTT_CD = #{institute}</select> <if test="account != null">AND USER_ACNT = #{account}</if>
<if test="institute != null"> AND NSTT_CD = #{institute}</if></where></select>
<insert id="insertUser" parameterType="cokr.xit.base.user.ManagedUser"> <insert id="insertUser" parameterType="cokr.xit.base.user.ManagedUser">/* 사용자 정보 등록(userMapper.insertUser) */
<selectKey resultType="string" keyProperty="id" keyColumn="NEW_ID" order="BEFORE">SELECT LPAD(NVL(MAX(USER_ID) + 1, 1), 10, '0') NEW_ID FROM TB_USER</selectKey> <selectKey resultType="string" keyProperty="id" keyColumn="NEW_ID" order="BEFORE">SELECT LPAD(NVL(MAX(USER_ID) + 1, 1), 10, '0') NEW_ID FROM TB_USER</selectKey>
/* 사용자 정보 등록(userMapper.insertUser) */
INSERT INTO TB_USER ( INSERT INTO TB_USER (
USER_ID USER_ID
, USER_ACNT , USER_ACNT
@ -128,7 +114,6 @@ INSERT INTO TB_USER (
, GRP_ID , GRP_ID
, ORG_ID , ORG_ID
, NSTT_CD , NSTT_CD
, DEPT_CD
, CRTFC_DN , CRTFC_DN
, LOCK_YN , LOCK_YN
, LOCK_CNT , LOCK_CNT
@ -162,7 +147,6 @@ INSERT INTO TB_USER (
, #{groupID} , #{groupID}
, #{orgID} , #{orgID}
, #{institute} , #{institute}
, #{deptCode}
, #{certificateDn} , #{certificateDn}
, 'N' , 'N'
, 0 , 0
@ -196,7 +180,6 @@ UPDATE TB_USER SET
, GRP_ID = #{groupID} , GRP_ID = #{groupID}
, ORG_ID = #{orgID} , ORG_ID = #{orgID}
, NSTT_CD = #{institute} , NSTT_CD = #{institute}
, DEPT_CD = #{deptCode}
, CRTFC_DN = #{certificateDn} , CRTFC_DN = #{certificateDn}
, STTS = #{status} , STTS = #{status}
, MDFCN_DT =<include refid="utility.now" /> , MDFCN_DT =<include refid="utility.now" />
@ -204,8 +187,8 @@ UPDATE TB_USER SET
WHERE USER_ID = #{id}</update> WHERE USER_ID = #{id}</update>
<update id="changePassword" parameterType="map">/* 비밀번호 변경(userMapper.changePassword) */ <update id="changePassword" parameterType="map">/* 비밀번호 변경(userMapper.changePassword) */
UPDATE TB_USER SET UPDATE TB_USER
PASSWD = CASE USER_ID<foreach collection="userPasswords" item="userPassword" separator=" "> SET PASSWD = CASE USER_ID<foreach collection="userPasswords" item="userPassword" separator=" ">
WHEN #{userPassword.userID} THEN #{userPassword.password}</foreach> WHEN #{userPassword.userID} THEN #{userPassword.password}</foreach>
ELSE PASSWD END ELSE PASSWD END
, MDFCN_DT =<include refid="utility.now" /> , MDFCN_DT =<include refid="utility.now" />
@ -223,7 +206,7 @@ UPDATE TB_USER SET
, LOCK_DT = NULL</if> , LOCK_DT = NULL</if>
, MDFCN_DT =<include refid="utility.now" /> , MDFCN_DT =<include refid="utility.now" />
, MDFR = #{currentUser.id} , MDFR = #{currentUser.id}
WHERE USER_ID IN (<foreach collection="userIDs" item="userID" separator=",">#{userID}</foreach>) WHERE USER_ID IN (<foreach collection="userIDs" item="userID" separator=",">#{userID}</foreach>)
</update> </update>
<update id="setStatus" parameterType="map">/* 사용자 상태 변경(userMapper.setStatus) */ <update id="setStatus" parameterType="map">/* 사용자 상태 변경(userMapper.setStatus) */

Loading…
Cancel
Save