Commit 2b0b86da by 徐高华

企微区分类型

parent efe10753
......@@ -80,7 +80,7 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
});
}
qw.setSelfCorpid(wxEnterprise.getCorpid());
logger.info("企微企业ID={}",JSON.toJSON(qw));
logger.info("企微所有corpid信息={}",JSON.toJSON(qw));
return qw;
}
......
......@@ -317,19 +317,19 @@ public class StaffApiServiceImpl implements StaffApiService {
res.setCode(4);
return res;
}
String staffThirdWxEnterpriseId = config.getStaffThirdWxEnterpriseId();
UserDTO user = null;
if (staffThirdWxEnterpriseId.contains(corpid)) {
WxEnterpriseQwDTO wxInfo = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
if(wxInfo.getWxSecurityType()==4) {
user = qywxUserApiService.getWorkWxUser(corpid, config.getWxSuiteid(), userId);
UserDTO userSelf = qywxUserApiService.getSelfWorkWxUser(corpid, secretSetting.getSecretVal(), user.getOpen_userid());
logger.info("成员详情(第三方)={}",JSON.toJSONString(user)) ;
UserDTO userSelf = qywxUserApiService.getSelfWorkWxUser(wxInfo.getDkCorpid(), secretSetting.getSecretVal(), user.getOpen_userid());
if (user != null && userSelf != null) {
user.setName(userSelf.getName());
}
} else {
user = qywxUserApiService.getSelfWorkWxUser(corpid, secretSetting.getSecretVal(), userId);
logger.info("成员详情(代开)={}",JSON.toJSONString(user)) ;
}
if (null == user) {
logger.info("企业微信用户不存在:{}:{}", wxEnterpriseId, userId);
res.setMessage("企业微信用户不存在");
......
......@@ -171,20 +171,20 @@ public class QywxDeptSyncOperation implements BaseSyncOperation {
String pDataId = preData.getpDataId();
if ("0".equals(pDataId)) {
//根级部门
List<UserDTO> list = this.qywxUserApiService.listSelfDepartmentUser(wxEnterpriseDTO.getCorpid(), secretSetting.getSecretVal(), dataId, 1);
List<UserDTO> list = null ;
WxEnterpriseQwDTO wxInfo = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
logger.info("第三方的通讯录={}",JSON.toJSONString(wxInfo));
logger.info("第三方的通讯录={}",JSON.toJSONString(this.qywxUserApiService.listDepartmentUser(wxEnterpriseDTO.getCorpid(), config.getWxSuiteid(), dataId, 1))) ;
logger.info("第三方的通讯录={}",JSON.toJSONString(this.qywxUserApiService.listDepartmentUser(wxInfo.getCorpid(), config.getWxSuiteid(), dataId, 1))) ;
logger.info("第三方的通讯录={}",JSON.toJSONString(this.qywxUserApiService.listDepartmentUser(wxInfo.getDkCorpid(), config.getWxSuiteid(), dataId, 1))) ;
if(wxInfo.getWxSecurityType()==4) {
list = this.qywxUserApiService.listDepartmentUser(wxEnterpriseDTO.getCorpid(), config.getWxSuiteid(), dataId, 1) ;
logger.info("通讯录(第三方)={}",JSON.toJSONString(list)) ;
}else {
list = this.qywxUserApiService.listSelfDepartmentUser(wxEnterpriseDTO.getCorpid(), secretSetting.getSecretVal(), dataId, 1);
logger.info("通讯录(代开)={}",JSON.toJSONString(list)) ;
}
if (null == list) {
logger.info("微信获取部门成员异常:{},{}", taskId, dataId);
return;
}
logger.info("是否已经进来了,进来");
logger.info("获取部门列表");
//预处理门店 写入预处理表
if (CollectionUtils.isNotEmpty(list)) {
List<String> dataList = preDealService.listDataIdByTaskIdAndDataType(taskId, PreDealTypeEnum.clerk.getVal());
......
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