비밀번호 변경 화면jsp명 수정, FimsUserBean 제거

main
이범준 5 months ago
parent 47f6a3da37
commit 49030cf4c5

@ -23,9 +23,6 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
@Resource(name="userService")
private UserService userService;
@Resource(name="fimsUserBean")
private cokr.xit.fims.base.service.bean.FimsUserBean fimsUserBean;
@Resource(name = "codeBean")
private CodeBean codeBean;
@ -121,23 +118,6 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
return super.update(user);
}
@RequestMapping(name="비밀번호 변경 화면",value="/openChangePassword.do")
public ModelAndView openChangePassword() {
ModelAndView mav = new ModelAndView("fims/user/password-info");
return mav;
}
@RequestMapping(name="비밀번호 확인",value="/confirmPassword.do")
public ModelAndView confirmPassword(String password) {
ModelAndView mav = new ModelAndView("jsonView");
boolean result = false;
result = fimsUserBean.confirmPassword(password);
mav.addObject("result", result);
return mav;
}
@RequestMapping(name="기본업무 저장",value="/saveDefaultTask.do")
public ModelAndView saveDefaultTask(String taskSeCd) {
ModelAndView mav = new ModelAndView("jsonView");

@ -1,15 +0,0 @@
package cokr.xit.fims.base.service.bean;
import org.springframework.stereotype.Component;
import cokr.xit.foundation.User;
@Component("fimsUserBean")
public class FimsUserBean extends cokr.xit.base.user.service.bean.UserBean {
public boolean confirmPassword(String password) {
User user = this.getUser(currentUser().getAccount(), currentUser().getInstitute());
return user.getPassword().equals(passwordEncoder.encode(password));
}
}

@ -99,8 +99,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">
<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>

@ -72,26 +72,18 @@
return;
}
ajax.get({
url : wctx.url("/user/confirmPassword.do"),
data : { password : $("#password-form input[name='currentPassword']").val() },
success : (resp) => {
if(resp.result){
savePassword();
} else {
dialog.alert("현재 비밀번호가 일치하지 않습니다.");
}
}
});
}
function savePassword(){
ajax.post({
url : wctx.url("/user/changePassword.do"),
data : {
userID : MY_INFO.id,
password : $("#password-form input[name='password']").val()
userIDs : MY_INFO.id,
password : $("#password-form input[name='password']").val(),
currentPassword : $("#password-form input[name='currentPassword']").val(),
init : false
},
success : (resp) => {
if(resp.saved){
@ -102,6 +94,5 @@
}
}
});
}
</script>

@ -112,7 +112,7 @@
</div>
</div>
</div>
<div class="col-md-6 hidden">
<div class="col-md-6">
<div class="row">
<label class="col-sm-3 col-form-label text-sm-end required" for="confirmPassword">
비밀번호 확인

@ -343,7 +343,7 @@ function fnOpenMyInfo(){
function fnOpenChangePassword(){
ajax.get({
url : wctx.url("/user/openChangePassword.do"),
url : wctx.url("/user/changePassword.do"),
data : { },
success : (resp) => {
dialog.open({

Loading…
Cancel
Save