代码优化

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();
employeeOfficeWhere.setEmpCode(employee.getEmpCode());
employeeOfficeDao.deleteByEntity(employeeOfficeWhere);
if (employee.getEmployeeOfficeList().size() > 0){
if (!employee.getEmployeeOfficeList().isEmpty()){
employee.getEmployeeOfficeList().forEach(employeeOffice -> {
employeeOffice.setId(IdGen.nextId());
employeeOffice.setEmpCode(employee.getEmpCode());