no message

main
이범준 1 year ago
parent e03cbb4359
commit 84f878ada0

@ -4367,7 +4367,7 @@ public class XitFrameCrudServiceBean extends AbstractServiceBean implements XitF
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getScrtySetupTrgetId()))
if(XitCmmnUtil.isEmpty(vo.getUserId()))
emsg = String.format("(%s)보안설정대상ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
@ -4398,7 +4398,7 @@ public class XitFrameCrudServiceBean extends AbstractServiceBean implements XitF
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getScrtySetupTrgetId()))
if(XitCmmnUtil.isEmpty(vo.getUserId()))
emsg = String.format("(%s)보안설정대상ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
@ -4431,7 +4431,7 @@ public class XitFrameCrudServiceBean extends AbstractServiceBean implements XitF
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getScrtySetupTrgetId()))
if(XitCmmnUtil.isEmpty(vo.getUserId()))
emsg = String.format("(%s)보안설정대상ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
@ -4464,7 +4464,7 @@ public class XitFrameCrudServiceBean extends AbstractServiceBean implements XitF
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getScrtySetupTrgetId()))
if(XitCmmnUtil.isEmpty(vo.getUserId()))
emsg = String.format("(%s)보안설정대상ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);

@ -451,7 +451,7 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
*/
//사용자보안설정 조회
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
userScrtySetupVO.setScrtySetupTrgetId(uniqId);
userScrtySetupVO.setUserId(uniqId);
List<XitUserScrtySetupVO> listUserScrtySetupVO = xitFrameCrudService.findXitUserScrtySetups(userScrtySetupVO);
String userAuthId = XitCmmnUtil.isEmpty(listUserScrtySetupVO)?null:listUserScrtySetupVO.get(0).getAuthId();

@ -44,7 +44,7 @@ public class AuthByUserMgtServiceBean extends AbstractServiceBean implements Aut
authGrpMgtService.isCheckUserForCanChange(sessionUniqId, String.valueOf(map.get("authId")));
XitUserScrtySetupVO vo = new XitUserScrtySetupVO();
vo.setScrtySetupTrgetId(String.valueOf(map.get("uniqId")));
vo.setUserId(String.valueOf(map.get("uniqId")));
vo.setAuthId(String.valueOf(map.get("authId")));
if(Objects.equals("N", map.get("regYn"))){
@ -62,7 +62,7 @@ public class AuthByUserMgtServiceBean extends AbstractServiceBean implements Aut
//삭제 시 사용자의 권한을 소속 그룹의 권한 또는 Defualt 권한으로 설정
paraList.forEach(map -> {
XitUserScrtySetupVO vo = new XitUserScrtySetupVO();
vo.setScrtySetupTrgetId(String.valueOf(map.get("uniqId")));
vo.setUserId(String.valueOf(map.get("uniqId")));
vo.setAuthId(userMgtService.getDefaultAuthId(String.valueOf(map.get("grpId"))));
userMapper.updateUserScrtySetup(vo);
});

@ -82,7 +82,7 @@ public class AuthGrpMgtServiceBean extends AbstractServiceBean implements AuthGr
public void isCheckUserForCanChange(final String uniqId, final String trgetAuthId) {
//사용자보안설정 조회
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
userScrtySetupVO.setScrtySetupTrgetId(uniqId);
userScrtySetupVO.setUserId(uniqId);
List<XitUserScrtySetupVO> listUserScrtySetupVO = userMgtMapper.selectUserScrtySetups(userScrtySetupVO);
String userAuthId = XitCmmnUtil.isEmpty(listUserScrtySetupVO)?null:listUserScrtySetupVO.get(0).getAuthId();

@ -24,6 +24,6 @@ public class XitUserScrtySetupVO {
*/
private static final long serialVersionUID = -4431553754531650113L;
protected String scrtySetupTrgetId; //보안 설정 대상 id
protected String userId; //보안 설정 대상 id
protected String authId; //권한 코드
}

@ -43,10 +43,10 @@ public interface UserMgtMapper {
List<XitUserScrtySetupVO> selectUserScrtySetups(final XitUserScrtySetupVO vo);
XitUserScrtySetupVO selectUserScrtySetup(final String scrtySetupTrgetId);
XitUserScrtySetupVO selectUserScrtySetup(final String userId);
int insertUserScrtySetup(final XitUserScrtySetupVO vo);
int updateUserScrtySetup(final XitUserScrtySetupVO vo);
int deleteUserScrtySetup(String scrtySetupTrgetId);
int deleteUserScrtySetup(String userId);

@ -79,7 +79,7 @@ public class UserMgtServiceBean extends AbstractServiceBean implements UserMgtSe
// 사용자 권한
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
userScrtySetupVO.setScrtySetupTrgetId(vo.getUserId());
userScrtySetupVO.setUserId(vo.getUserId());
userScrtySetupVO.setAuthId(this.getDefaultAuthId(vo.getGrpId()));
mapper.insertUserScrtySetup(userScrtySetupVO);
@ -116,10 +116,10 @@ public class UserMgtServiceBean extends AbstractServiceBean implements UserMgtSe
//그룹ID가 변경되었을 경우 사용자의 권한 갱신
if(!Objects.equals(vo.getGrpId(), userInfoCheckMap.get("grp_id"))) {
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
userScrtySetupVO.setScrtySetupTrgetId(vo.getUniqId());
userScrtySetupVO.setUserId(vo.getUniqId());
userScrtySetupVO.setAuthId(this.getDefaultAuthId(vo.getGrpId()));
if(Checks.isEmpty(mapper.selectUserScrtySetup(userScrtySetupVO.getScrtySetupTrgetId()))) {
if(Checks.isEmpty(mapper.selectUserScrtySetup(userScrtySetupVO.getUserId()))) {
mapper.insertUserScrtySetup(userScrtySetupVO);
}else {
mapper.updateUserScrtySetup(userScrtySetupVO);
@ -132,11 +132,11 @@ public class UserMgtServiceBean extends AbstractServiceBean implements UserMgtSe
//업무사용자 삭제
Map<String,Object> userInfoCheckMap = mapper.selectCheckUserInfo(userId);
String scrtySetupTrgetId = String.valueOf(userInfoCheckMap.get("user_id"));
String userId = String.valueOf(userInfoCheckMap.get("user_id"));
//사용자보안설정 삭제
if(Checks.isNotEmpty(mapper.selectUserScrtySetup(scrtySetupTrgetId))) {
mapper.deleteUserScrtySetup(scrtySetupTrgetId);
if(Checks.isNotEmpty(mapper.selectUserScrtySetup(userId))) {
mapper.deleteUserScrtySetup(userId);
}
//사용자정보변경내역 전체 삭제
mapper.deleteUserInfoChangeDtlsList(userId);

@ -42,9 +42,9 @@
INNER JOIN tb_menu B
ON A.menu_no = B.menu_no
INNER JOIN (
SELECT FA.auth_Id, FA.scrty_setup_trget_id
SELECT FA.auth_Id, FA.USER_ID
FROM xit_user_scrty_setup FA
WHERE FA.scrty_setup_trget_id = #{uniqId}
WHERE FA.USER_ID = #{uniqId}
) C
ON A.auth_Id = C.auth_Id
INNER JOIN tree_query D

@ -2506,49 +2506,49 @@
<select id="findXitUserScrtySetups" resultType="cokr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO">
/** findXitUserScrtySetups */
/** 사용자보안설정 다건 조회 */
SELECT SCRTY_SETUP_TRGET_ID
SELECT USER_ID
,auth_Id
FROM XIT_USER_SCRTY_SETUP
FROM TB_AUTH_USER
WHERE 1=1
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(scrtySetupTrgetId)">AND SCRTY_SETUP_TRGET_ID = #{scrtySetupTrgetId}</if>
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(userId)">AND USER_ID = #{userId}</if>
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(authId)">AND auth_Id = #{authId}</if>
</select>
<select id="findXitUserScrtySetup" resultType="cokr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO">
/** findXitUserScrtySetup */
/** 사용자보안설정 조회 */
SELECT SCRTY_SETUP_TRGET_ID
SELECT USER_ID
,auth_Id
FROM XIT_USER_SCRTY_SETUP
FROM TB_AUTH_USER
WHERE 1=1
AND SCRTY_SETUP_TRGET_ID = #{scrtySetupTrgetId}
AND USER_ID = #{userId}
</select>
<insert id="addXitUserScrtySetup">
/** addXitUserScrtySetup */
/** 사용자보안설정 등록 */
INSERT
INTO xit_user_scrty_setup (
scrty_setup_trget_id
USER_ID
, auth_Id
) VALUES (
#{scrtySetupTrgetId}
#{userId}
, #{authId}
)
</insert>
<update id="modifyXitUserScrtySetup">
/** modifyXitUserScrtySetup */
/** 사용자보안설정 수정 */
UPDATE XIT_USER_SCRTY_SETUP
UPDATE TB_AUTH_USER
SET
auth_Id = #{authId}
WHERE 1=1
AND SCRTY_SETUP_TRGET_ID = #{scrtySetupTrgetId}
AND USER_ID = #{userId}
</update>
<delete id="removeXitUserScrtySetup">
/** removeXitUserScrtySetup */
/** 사용자보안설정 삭제 */
DELETE FROM XIT_USER_SCRTY_SETUP
DELETE FROM TB_AUTH_USER
WHERE 1=1
AND SCRTY_SETUP_TRGET_ID = #{scrtySetupTrgetId}
AND USER_ID = #{userId}
</delete>

@ -46,9 +46,9 @@
,(SELECT COUNT(1) FROM TREE_QUERY SA WHERE SA.PARNT_MENU_ID=D.MENU_ID) AS "childCnt"
FROM XIT_MENU_CREAT_DTLS A
INNER JOIN tb_menu B ON A.MENU_NO = B.MENU_NO
INNER JOIN (SELECT FA.auth_Id, FA.SCRTY_SETUP_TRGET_ID
FROM XIT_USER_SCRTY_SETUP FA
WHERE FA.SCRTY_SETUP_TRGET_ID = #{uniqId}
INNER JOIN (SELECT FA.auth_Id, FA.USER_ID
FROM TB_AUTH_USER FA
WHERE FA.USER_ID = #{uniqId}
) C ON A.auth_Id = C.auth_Id
INNER JOIN TREE_QUERY D ON B.MENU_NO=D.MENU_ID

@ -15,12 +15,12 @@
,B.img_nm AS "imgNm"
,B.pgrm_file_nm AS "pgrmFileNm"
,(SELECT SA.URL FROM XIT_PROGRM_LIST SA WHERE B.pgrm_file_nm = SA.pgrm_file_nm) AS "chkURL"
,C.SCRTY_SETUP_TRGET_ID
,C.USER_ID
FROM XIT_MENU_CREAT_DTLS A
INNER JOIN tb_menu B ON A.MENU_NO = B.MENU_NO
INNER JOIN (SELECT FA.auth_Id, FA.SCRTY_SETUP_TRGET_ID
FROM XIT_USER_SCRTY_SETUP FA
WHERE FA.SCRTY_SETUP_TRGET_ID = #{tmpUniqId}
INNER JOIN (SELECT FA.auth_Id, FA.USER_ID
FROM TB_AUTH_USER FA
WHERE FA.USER_ID = #{tmpUniqId}
) C ON A.auth_Id = C.auth_Id
WHERE 1=1
AND B.MENU_NO &gt; 0
@ -42,9 +42,9 @@
,(SELECT SA.URL FROM XIT_PROGRM_LIST SA WHERE B.pgrm_file_nm = SA.pgrm_file_nm) AS "chkURL"
FROM XIT_MENU_CREAT_DTLS A
INNER JOIN tb_menu B ON A.MENU_NO = B.MENU_NO
INNER JOIN (SELECT FA.auth_Id, FA.SCRTY_SETUP_TRGET_ID
FROM XIT_USER_SCRTY_SETUP FA
WHERE FA.SCRTY_SETUP_TRGET_ID = #{tmpUniqId}
INNER JOIN (SELECT FA.auth_Id, FA.USER_ID
FROM TB_AUTH_USER FA
WHERE FA.USER_ID = #{tmpUniqId}
) C ON A.auth_Id = C.auth_Id
WHERE 1=1
ORDER BY B.srt_ord

@ -12,7 +12,7 @@
, xui.grp_id
, cdc.code_val AS mberTyNm
, uss.auth_Id
, IF(uss.scrty_setup_trget_id IS NULL, 'N', 'Y') AS regYn
, IF(uss.USER_ID IS NULL, 'N', 'Y') AS regYn
FROM (
SELECT USER_ID
, USER_ACNT
@ -20,7 +20,7 @@
, grp_id
FROM tb_user ) xui
LEFT OUTER JOIN xit_user_scrty_setup uss
ON xui.USER_ID = uss.scrty_setup_trget_id
ON xui.USER_ID = uss.USER_ID
LEFT OUTER JOIN tb_cmn_code cdc
ON cdc.grp_id = 'XIT012'
AND 1=1

@ -157,8 +157,8 @@
/** XitMenuCreateMngMapper.findUserScrtySetupByUsr */
/** 사용자별 사용자보안설정 데이터 조회 */
SELECT auth_Id AS "authId"
FROM XIT_USER_SCRTY_SETUP
WHERE SCRTY_SETUP_TRGET_ID = (
FROM TB_AUTH_USER
WHERE USER_ID = (
SELECT USER_ID
FROM XIT_VW_USER_MASTR
WHERE USER_ACNT = #{searchKeyword}

@ -216,12 +216,12 @@
************************************************************************************************************** -->
<select id="selectUserScrtySetups" parameterType="cokr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO" resultType="cokr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO">
/* user-mysql-mapper|selectUserScrtySetups-사용자보안설정 목록 조회|julim */
SELECT scrty_setup_trget_id
SELECT USER_ID
, auth_Id
FROM xit_user_scrty_setup
<where>
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(scrtySetupTrgetId)">
AND scrty_setup_trget_id = #{scrtySetupTrgetId}
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(userId)">
AND USER_ID = #{userId}
</if>
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(authId)">
AND auth_Id = #{authId}
@ -231,20 +231,20 @@
<select id="selectUserScrtySetup" parameterType="string" resultType="cokr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO">
/* user-mysql-mapper|selectUserScrtySetup-사용자보안설정 조회|julim */
SELECT scrty_setup_trget_id
SELECT USER_ID
, auth_Id
FROM xit_user_scrty_setup
WHERE scrty_setup_trget_id = #{scrtySetupTrgetId}
WHERE USER_ID = #{userId}
</select>
<insert id="insertUserScrtySetup" parameterType="cokr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO">
/* user-mysql-mapper|insertUserScrtySetup-사용자보안설정 등록|julim */
INSERT
INTO xit_user_scrty_setup (
scrty_setup_trget_id
USER_ID
, auth_Id
) VALUES (
#{scrtySetupTrgetId}
#{userId}
, #{authId}
)
</insert>
@ -253,14 +253,14 @@
/* user-mysql-mapper|updateUserScrtySetup-사용자보안설정 변경|julim */
UPDATE xit_user_scrty_setup
SET auth_Id = IF(auth_Id = #{authId}, auth_Id, #{authId})
WHERE scrty_setup_trget_id = #{scrtySetupTrgetId}
WHERE USER_ID = #{userId}
</update>
<delete id="deleteUserScrtySetup" parameterType="string">
/* user-mysql-mapper|deleteUserScrtySetup-사용자보안설정 삭제|julim */
DELETE
FROM xit_user_scrty_setup
WHERE scrty_setup_trget_id = #{scrtySetupTrgetId}
WHERE USER_ID = #{userId}
</delete>

Loading…
Cancel
Save