Commit 5d97088f by qwmqiuwenmin

fix

parent 38cb7761
......@@ -46,6 +46,7 @@ import com.gic.haoban.manage.service.service.DepartmentService;
import com.gic.haoban.manage.service.service.StaffDepartmentRelatedService;
import com.gic.haoban.manage.service.service.SyncErrorLogService;
import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.redis.data.util.RedisUtil;
import com.gic.wechat.api.service.qywx.QywxDepartmentApiService;
import com.github.pagehelper.PageHelper;
......@@ -502,12 +503,14 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
//
// DepartmentDTO parent = EntityUtil.changeEntityByJSON(DepartmentDTO.class,departmentService.selectById(parentId));
// 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, null);
logger.info("企业所有部门数据:{}", JSON.toJSONString(list));
if(CollectionUtils.isNotEmpty(list)){
this.addAllDepartment(list, 0, wxEnterpriseId, corpid, contactSecret,taskId);
}
RedisUtil.unlock("init_enterprise_" + 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