From 469ccbff2b83b4fae78f19154206ac8a75cc47bc Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Thu, 9 May 2024 09:39:55 +0900 Subject: [PATCH] =?UTF-8?q?fims=20=EC=95=94=ED=98=B8=ED=99=94=20=EB=AA=A8?= =?UTF-8?q?=EB=93=88=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/auth/service/bean/AuthApiServiceBean.java | 6 ++++-- .../resources/sql/mapper/core/auth-mysql-mapper.xml | 8 ++++---- src/main/resources/sql/work/nims_work.sql | 13 +++++++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/main/java/cokr/xit/adds/core/auth/service/bean/AuthApiServiceBean.java b/src/main/java/cokr/xit/adds/core/auth/service/bean/AuthApiServiceBean.java index e5400a3..6562409 100644 --- a/src/main/java/cokr/xit/adds/core/auth/service/bean/AuthApiServiceBean.java +++ b/src/main/java/cokr/xit/adds/core/auth/service/bean/AuthApiServiceBean.java @@ -7,8 +7,8 @@ import org.springframework.stereotype.Service; import cokr.xit.adds.core.auth.dao.IAuthApiMapper; import cokr.xit.adds.core.auth.service.IAuthApiService; import cokr.xit.foundation.component.AbstractServiceBean; +import cokr.xit.foundation.util.CharsEncoder; import egovframework.com.cmm.model.LoginVO; -import egovframework.com.cmm.util.EgovFileScrty; @Service //public class AuthApiService extends EgovAbstractServiceImpl implements IAuthApiService { @@ -26,7 +26,9 @@ public class AuthApiServiceBean extends AbstractServiceBean implements IAuthApiS public LoginVO actionLogin(LoginVO vo) { // 1. 입력한 비밀번호를 암호화한다. - String enpassword = EgovFileScrty.encryptPassword(vo.getPassword(), vo.getId()); + // fims framework 암호화 적용 + //String enpassword = EgovFileScrty.encryptPassword(vo.getPassword(), vo.getId()); + String enpassword = new CharsEncoder().encode(vo.getPassword()); vo.setPassword(enpassword); // 2. 아이디와 암호화된 비밀번호가 DB와 일치하는지 확인한다. diff --git a/src/main/resources/sql/mapper/core/auth-mysql-mapper.xml b/src/main/resources/sql/mapper/core/auth-mysql-mapper.xml index de175cb..24fbcb1 100644 --- a/src/main/resources/sql/mapper/core/auth-mysql-mapper.xml +++ b/src/main/resources/sql/mapper/core/auth-mysql-mapper.xml @@ -16,10 +16,10 @@ , 'USR' AS userSe , org_id AS orgnzt_id , user_id AS esntl_id - FROM tb_user - WHERE user_acnt = #{id} - AND passwd = #{password} - AND stts = 'P' + FROM tb_user + WHERE user_acnt = #{id} + AND passwd = #{password} + AND stts = 'A' /* SELECT user_id AS id diff --git a/src/main/resources/sql/work/nims_work.sql b/src/main/resources/sql/work/nims_work.sql index 2f093f8..51d323e 100644 --- a/src/main/resources/sql/work/nims_work.sql +++ b/src/main/resources/sql/work/nims_work.sql @@ -133,3 +133,16 @@ WITH RECURSIVE temp ( from temp order by temp.path; + +SELECT user_acnt AS id + , user_nm AS name + , passwd AS password + , rsdnt_no AS ihidnum + , eml_adrs AS email + , 'USR' AS userSe + , org_id AS orgnzt_id + , user_id AS esntl_id + FROM tb_user + WHERE user_acnt = 'admin' + -- AND passwd = ? + AND stts = 'P'