Commit d0bac6c1 by fudahua

Merge remote-tracking branch 'origin/developer' into developer

parents 9738d7c4 0b2db316
......@@ -499,17 +499,18 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
//
// DepartmentDTO parent = EntityUtil.changeEntityByJSON(DepartmentDTO.class,departmentService.selectById(parentId));
// this.addSon(subList, wxEnterpriseId, parent,corpid,suiteid);
String taskId = StringUtil.randomUUID();
List<com.gic.wechat.api.dto.qywx.DepartmentDTO> list = this.qywxDepartmentApiService.listSelfDepartment(corpid, contactSecret, null);
logger.info("企业所有部门数据:{}", JSON.toJSONString(list));
if(CollectionUtils.isNotEmpty(list)){
this.addAllDepartment(list, 0, wxEnterpriseId, corpid, contactSecret);
this.addAllDepartment(list, 0, wxEnterpriseId, corpid, contactSecret,taskId);
}
}
private void addAllDepartment(List<com.gic.wechat.api.dto.qywx.DepartmentDTO> list, Integer parentId,
String wxEnterpriseId, String corpid, String contactSecret){
String wxEnterpriseId, String corpid, String contactSecret,String taskId){
int level = 1;
String chainId = "0";
String chainName = "0";
......@@ -544,9 +545,14 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
}
} catch (Exception e) {
TabHaobanSyncErrorLog tab = new TabHaobanSyncErrorLog();
//tab.setDataId(dataId);
tab.setDataId(departmentDTO.getId()+"");
tab.setDataType(0);
tab.setLogType(0);
tab.setReason(e.getMessage());
tab.setTaskId(taskId);
tab.setWxEnterpriseId(wxEnterpriseId);
}
this.addAllDepartment(list, departmentDTO.getId(), wxEnterpriseId, corpid, contactSecret);
this.addAllDepartment(list, departmentDTO.getId(), wxEnterpriseId, corpid, contactSecret,taskId);
this.staffApiService.initWxUser(corpid, contactSecret, wxEnterpriseId, departmentDTO.getId());
}
}
......
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