Commit e7426909 by qwmqiuwenmin

fix

parent 9dee53a2
......@@ -508,12 +508,12 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
// this.addSon(subList, wxEnterpriseId, parent,corpid,suiteid);
RedisUtil.lock("init_enterprise_" + wxEnterpriseId,60 * 60L);
String taskId = StringUtil.randomUUID();
List<com.gic.wechat.api.dto.qywx.DepartmentDTO> list = this.qywxDepartmentApiService.listSelfDepartment(corpid, contactSecret, 1);
logger.info("企业所有部门数据:{}", JSON.toJSONString(list));
// List<com.gic.wechat.api.dto.qywx.DepartmentDTO> list = this.qywxDepartmentApiService.listSelfDepartment(corpid, contactSecret, 1);
// logger.info("企业所有部门数据:{}", JSON.toJSONString(list));
// if(CollectionUtils.isNotEmpty(list)){
// this.addAllDepartment(list, 0, wxEnterpriseId, corpid, contactSecret,taskId);
// }
// insertMQ(0,wxEnterpriseId, corpid,contactSecret,taskId);
insertMQ(0,wxEnterpriseId, corpid,contactSecret,taskId);
RedisUtil.unlock("init_enterprise_" + wxEnterpriseId);
}
......@@ -549,7 +549,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
String chainName = "0";
String pid = "0";
List<com.gic.wechat.api.dto.qywx.DepartmentDTO> handerList = new ArrayList<>();
if(parentId == 0){
if(parentId.equals(0)){
for (com.gic.wechat.api.dto.qywx.DepartmentDTO departmentDTO : list) {
if(departmentDTO.getId() == 1){
handerList.add(departmentDTO);
......@@ -557,7 +557,11 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
}
}
}else{
handerList = list;
for (com.gic.wechat.api.dto.qywx.DepartmentDTO departmentDTO : list) {
if(departmentDTO.getParentid().equals(parentId)){
handerList.add(departmentDTO);
}
}
}
if(parentId != 0){
TabHaobanDepartment parent = this.departmentService.getByWxId(parentId + "", wxEnterpriseId);
......
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