异常response处理

This commit is contained in:
zhangchenbiao
2023-06-16 17:36:00 +08:00
parent a2157ba784
commit 901815d714
5 changed files with 102 additions and 20 deletions

View File

@@ -227,4 +227,27 @@ public class SysDepartmentDTO {
}
return resultList;
}
public static RegionDO convertRegionDO(SysDepartmentDTO dept, Multimap<String, String> leaderDeptMap, RegionDO parentRegion){
RegionDO region = new RegionDO();
region.setRegionId(dept.getId());
region.setName(dept.getName());
region.setParentId(dept.getParentId());
region.setUnclassifiedFlag(CommonConstants.ZERO);
region.setLeaderUserId(dept.getLeaderUserId());
region.setOrderNum(dept.getDepartOrder());
region.setThirdDeptId(dept.getId());
region.setCreateTime(System.currentTimeMillis());
region.setUpdateTime(System.currentTimeMillis());
String regionPath = parentRegion.getRegionPath() + region.getRegionId() + CommonConstants.PATH_SPILT;
region.setRegionPath(regionPath);
region.setDeleted(Boolean.FALSE);
if(CollectionUtils.isNotEmpty(dept.getDeptManagerUseridList())){
for (String leader : dept.getDeptManagerUseridList()) {
leaderDeptMap.put(leader, dept.getId());
}
}
return region;
}
}