fix: default dispatchStatus/empStatus for employee create

This commit is contained in:
pray4skylark
2026-06-05 19:37:12 +09:00
parent 9ca9d83e80
commit 40415fc6dc
2 changed files with 10 additions and 3 deletions
@@ -80,6 +80,10 @@ public class EmployeeService {
throw new BusinessException(ErrorCode.DUPLICATE_LOGIN_ID);
}
if (employee.getRoleCode() == null) employee.setRoleCode(RoleCode.EMPLOYEE);
if (employee.getEmpStatus() == null) employee.setEmpStatus(EmpStatus.ACTIVE);
if (employee.getDispatchStatus() == null) employee.setDispatchStatus(DispatchStatus.WAITING);
employee.setPassword(passwordEncoder.encode(employee.getPassword()));
return employeeRepository.save(employee);
}