|
|
|
@ -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
|
|
|
|
|
<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="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 *
|
|
|
|
|
FROM TB_USER
|
|
|
|
|
WHERE USER_ACNT = #{account}
|
|
|
|
|
AND NSTT_CD = #{institute}</select>
|
|
|
|
|
<where><if test="userID != null">AND USER_ID = #{userID}</if>
|
|
|
|
|
<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>
|
|
|
|
|
/* 사용자 정보 등록(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 =<include refid="utility.now" />
|
|
|
|
@ -204,8 +187,8 @@ UPDATE TB_USER SET
|
|
|
|
|
WHERE USER_ID = #{id}</update>
|
|
|
|
|
|
|
|
|
|
<update id="changePassword" parameterType="map">/* 비밀번호 변경(userMapper.changePassword) */
|
|
|
|
|
UPDATE TB_USER SET
|
|
|
|
|
PASSWD = CASE USER_ID<foreach collection="userPasswords" item="userPassword" separator=" ">
|
|
|
|
|
UPDATE TB_USER
|
|
|
|
|
SET PASSWD = CASE USER_ID<foreach collection="userPasswords" item="userPassword" separator=" ">
|
|
|
|
|
WHEN #{userPassword.userID} THEN #{userPassword.password}</foreach>
|
|
|
|
|
ELSE PASSWD END
|
|
|
|
|
, MDFCN_DT =<include refid="utility.now" />
|
|
|
|
@ -223,7 +206,7 @@ UPDATE TB_USER SET
|
|
|
|
|
, LOCK_DT = NULL</if>
|
|
|
|
|
, MDFCN_DT =<include refid="utility.now" />
|
|
|
|
|
, 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 id="setStatus" parameterType="map">/* 사용자 상태 변경(userMapper.setStatus) */
|
|
|
|
|