Commit 973556ac by 徐高华

定制通讯录部门id

parent 4b7406c9
......@@ -21,6 +21,7 @@ import com.gic.haoban.manage.service.entity.*;
import com.gic.haoban.manage.service.service.*;
import com.gic.haoban.manage.service.service.impl.PreDealServiceImpl;
import com.gic.haoban.manage.service.task.BaseSyncOperation;
import com.gic.haoban.manage.service.util.CustomSwitcher;
import com.gic.mq.sdk.GicMQClient;
import com.gic.redis.data.util.RedisUtil;
import com.gic.wechat.api.service.qywx.QywxDepartmentApiService;
......@@ -544,7 +545,13 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
unlockTask(wxEnterpriseId);
return "没有配置secret";
}
List<com.gic.wechat.api.dto.qywx.DepartmentDTO> list = qywxDepartmentApiService.listSelfDepartment(qwDTO.getDkCorpid(), secretSetting.getSecretVal(), 1,qwDTO.getUrlHost());
Map<String,Integer> map = CustomSwitcher.haoban_department_id ;
int id = 1 ;
if(null != map && null != map.get(wxEnterpriseId)) {
id = map.get(wxEnterpriseId) ;
}
logger.info("id={}",id);
List<com.gic.wechat.api.dto.qywx.DepartmentDTO> list = qywxDepartmentApiService.listSelfDepartment(qwDTO.getDkCorpid(), secretSetting.getSecretVal(), id,qwDTO.getUrlHost());
if (CollectionUtils.isEmpty(list)) {
logger.info("企微部门数量0,退出同步");
syncTaskService.updateTaskStatus(taskId, SyncTaskStatusEnum.exception_close.getVal());
......
......@@ -3,6 +3,8 @@ package com.gic.haoban.manage.service.util;
import com.gic.commons.switcher.Switcher;
import com.gic.commons.switcher.SwitcherNamespace;
import java.util.Map;
@SwitcherNamespace("BUZ.qywx.open")
public class CustomSwitcher {
......@@ -15,4 +17,7 @@ public class CustomSwitcher {
@Switcher
public static String haoban_one_bind_many ;
@Switcher
public static Map<String,Integer> haoban_department_id ;
}
\ No newline at end of file
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