fix: prevent login_id null on employee update
This commit is contained in:
@@ -96,13 +96,6 @@ public class EmployeeService {
|
||||
throw new BusinessException(ErrorCode.RESIGNED_EMPLOYEE);
|
||||
}
|
||||
|
||||
if (!employee.getLoginId().equals(updateRequest.getLoginId())) {
|
||||
if (employeeRepository.findByLoginId(updateRequest.getLoginId()).isPresent()) {
|
||||
throw new BusinessException(ErrorCode.DUPLICATE_LOGIN_ID);
|
||||
}
|
||||
employee.setLoginId(updateRequest.getLoginId());
|
||||
}
|
||||
|
||||
employee.setName(updateRequest.getName());
|
||||
employee.setEmail(updateRequest.getEmail());
|
||||
employee.setPhone(updateRequest.getPhone());
|
||||
|
||||
Reference in New Issue
Block a user