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