代码优化

This commit is contained in:
thinkgem
2025-08-27 23:51:33 +08:00
parent 4ff2e23780
commit c74d5823dc

View File

@@ -181,7 +181,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
EmployeeOffice employeeOfficeWhere = new EmployeeOffice(); EmployeeOffice employeeOfficeWhere = new EmployeeOffice();
employeeOfficeWhere.setEmpCode(employee.getEmpCode()); employeeOfficeWhere.setEmpCode(employee.getEmpCode());
employeeOfficeDao.deleteByEntity(employeeOfficeWhere); employeeOfficeDao.deleteByEntity(employeeOfficeWhere);
if (employee.getEmployeeOfficeList().size() > 0){ if (!employee.getEmployeeOfficeList().isEmpty()){
employee.getEmployeeOfficeList().forEach(employeeOffice -> { employee.getEmployeeOfficeList().forEach(employeeOffice -> {
employeeOffice.setId(IdGen.nextId()); employeeOffice.setId(IdGen.nextId());
employeeOffice.setEmpCode(employee.getEmpCode()); employeeOffice.setEmpCode(employee.getEmpCode());