mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
마이페이지 비밀번호 수정기능 추가
This commit is contained in:
@@ -17,6 +17,7 @@ public interface AccountMapper {
|
|||||||
|
|
||||||
int insertToAuthority(AuthorityDto dto);
|
int insertToAuthority(AuthorityDto dto);
|
||||||
int update(AccountDto dto);
|
int update(AccountDto dto);
|
||||||
|
int updateIncludePassword(AccountDto dto);
|
||||||
|
|
||||||
AccountDto selectById(AccountDto dto);
|
AccountDto selectById(AccountDto dto);
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ public class AccountService {
|
|||||||
public int update(AccountDto dto){
|
public int update(AccountDto dto){
|
||||||
return mapper.update(dto);
|
return mapper.update(dto);
|
||||||
}
|
}
|
||||||
|
public int updateIncludePassword(AccountDto dto) {
|
||||||
|
return mapper.updateIncludePassword(dto);
|
||||||
|
}
|
||||||
|
|
||||||
public AccountDto selectById(AccountDto dto){
|
public AccountDto selectById(AccountDto dto){
|
||||||
return mapper.selectById(dto);
|
return mapper.selectById(dto);
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class MypageController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
@PutMapping("/mypage/updateUserInfo")
|
@PutMapping("/mypage/updateUserInfo")
|
||||||
public boolean updateUserInfo(AccountDto dto) {
|
public boolean updateUserInfo(AccountDto dto) {
|
||||||
int i = accountService.update(dto);
|
int i = accountService.updateIncludePassword(dto);
|
||||||
System.out.println(i);
|
System.out.println(i);
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -137,6 +137,22 @@
|
|||||||
activation = #{activation}
|
activation = #{activation}
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateIncludePassword" parameterType="accountDto">
|
||||||
|
update account SET
|
||||||
|
name = #{name},
|
||||||
|
password = #{password},
|
||||||
|
employee_number = #{employeeNumber},
|
||||||
|
email = #{email},
|
||||||
|
personal_authority_id = #{personalAuthorityId},
|
||||||
|
gender = #{gender},
|
||||||
|
birth = #{birth},
|
||||||
|
telephone = #{telephone},
|
||||||
|
address = #{address},
|
||||||
|
department_id = #{departmentId},
|
||||||
|
position_id = #{positionId},
|
||||||
|
activation = #{activation}
|
||||||
|
WHERE id = #{id}
|
||||||
|
</update>
|
||||||
<update id="delete" parameterType="accountDto">
|
<update id="delete" parameterType="accountDto">
|
||||||
update account SET activation = false WHERE id = #{id}
|
update account SET activation = false WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -145,6 +145,7 @@
|
|||||||
$("#submitBtn").on("click",function(){
|
$("#submitBtn").on("click",function(){
|
||||||
//
|
//
|
||||||
var name = $("#name").val();
|
var name = $("#name").val();
|
||||||
|
var password = $("#password").val();
|
||||||
var employeeNumber = $("#employeeNumber").val();
|
var employeeNumber = $("#employeeNumber").val();
|
||||||
var email = $("#email").val();
|
var email = $("#email").val();
|
||||||
var personalAuthorityId = $("#personalAuthorityId").val();
|
var personalAuthorityId = $("#personalAuthorityId").val();
|
||||||
@@ -158,6 +159,7 @@
|
|||||||
var activation = true;
|
var activation = true;
|
||||||
|
|
||||||
const data = { name : name,
|
const data = { name : name,
|
||||||
|
password : password,
|
||||||
employeeNumber : employeeNumber,
|
employeeNumber : employeeNumber,
|
||||||
email : email,
|
email : email,
|
||||||
personalAuthorityId : personalAuthorityId,
|
personalAuthorityId : personalAuthorityId,
|
||||||
|
|||||||
Reference in New Issue
Block a user