瀏覽代碼

修改删除部门时,删除子部门公路,路段信息

tags/v1.1.0^2
wanjing 1 年之前
父節點
當前提交
2104a57619
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. +7
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/delete/DeleteDeptService.java

+ 7
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/delete/DeleteDeptService.java 查看文件

@@ -127,10 +127,13 @@ public class DeleteDeptService {
* @return 结果
*/
private void deleteRoadDept(String tenantId, String deptId) {
Map<String, Object> map = new HashMap<>();
map.put("tenant_id", tenantId);
map.put("dept_id", deptId);
roadDeptMapper.deleteByMap(map);
List<String> deptIdList = deptMapper.selectAllChildListById(deptId);
if (CollectionUtil.isEmpty(deptIdList)) {
return;
}
roadDeptMapper.delete(new LambdaQueryWrapper<RoadDept>()
.eq(RoadDept::getTenantId, tenantId)
.in(RoadDept::getDeptId, deptIdList));
}

/**

Loading…
取消
儲存