관리자 관리 수정
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.kamco.cd.kamcoback.members.service;
|
||||
|
||||
import com.kamco.cd.kamcoback.common.enums.StatusType;
|
||||
import com.kamco.cd.kamcoback.common.exception.CustomApiException;
|
||||
import com.kamco.cd.kamcoback.common.utils.CommonStringUtils;
|
||||
import com.kamco.cd.kamcoback.members.dto.MembersDto;
|
||||
@@ -26,7 +25,7 @@ public class AdminService {
|
||||
*/
|
||||
@Transactional
|
||||
public Long saveMember(MembersDto.AddReq addReq) {
|
||||
if (!CommonStringUtils.isValidPassword(addReq.getTempPassword())) {
|
||||
if (!CommonStringUtils.isValidPassword(addReq.getPassword())) {
|
||||
throw new CustomApiException("WRONG_PASSWORD", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
@@ -41,12 +40,6 @@ public class AdminService {
|
||||
*/
|
||||
@Transactional
|
||||
public void updateMembers(UUID uuid, MembersDto.UpdateReq updateReq) {
|
||||
if (StatusType.INACTIVE.getId().equals(updateReq.getStatus())) {
|
||||
// 미사용 처리
|
||||
membersCoreService.deleteMember(uuid);
|
||||
} else {
|
||||
// 수정
|
||||
membersCoreService.updateMembers(uuid, updateReq);
|
||||
}
|
||||
membersCoreService.updateMembers(uuid, updateReq);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class MembersService {
|
||||
@Transactional
|
||||
public void resetPassword(String id, MembersDto.InitReq initReq) {
|
||||
|
||||
if (!CommonStringUtils.isValidPassword(initReq.getPassword())) {
|
||||
if (!CommonStringUtils.isValidPassword(initReq.getNewPassword())) {
|
||||
throw new CustomApiException("WRONG_PASSWORD", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
membersCoreService.resetPassword(id, initReq);
|
||||
|
||||
Reference in New Issue
Block a user