Commit 4e3d2fc9 by xuwenhao

11.8修改同步钉钉数据

parent 08487965
...@@ -219,14 +219,18 @@ public class DdDeptServcieImpl implements IDdDeptService { ...@@ -219,14 +219,18 @@ public class DdDeptServcieImpl implements IDdDeptService {
@Override @Override
@Transactional @Transactional
public String syncDdDept() { public String syncDdDept() {
//获取系统所有部门列表
List<SysDdDept> deptList = ddDeptMapper.selectDdDeptList(new SysDdDept());
if (deptList.size() <= 0){
addDdDept();
}else{
//获取钉钉所有部门列表 //获取钉钉所有部门列表
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> ddDeptList = getDeptList(); List<OapiV2DepartmentListsubResponse.DeptBaseResponse> ddDeptList = getDeptList();
//存放钉钉部门不存在系统库集合 //存放钉钉部门不存在系统库集合
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> ddDeptList1 = new ArrayList<>(); List<OapiV2DepartmentListsubResponse.DeptBaseResponse> ddDeptList1 = new ArrayList<>();
ddDeptList1.addAll(ddDeptList); ddDeptList1.addAll(ddDeptList);
//获取系统所有部门列表
List<SysDdDept> deptList = ddDeptMapper.selectDdDeptList(new SysDdDept());
//存放钉钉删除了的部门集合 //存放钉钉删除了的部门集合
List<SysDdDept> deptList1 = new ArrayList<>(); List<SysDdDept> deptList1 = new ArrayList<>();
deptList1.addAll(deptList); deptList1.addAll(deptList);
...@@ -311,6 +315,7 @@ public class DdDeptServcieImpl implements IDdDeptService { ...@@ -311,6 +315,7 @@ public class DdDeptServcieImpl implements IDdDeptService {
} }
} }
} }
}
return "同步成功"; return "同步成功";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment