Commit c389618b by 墨竹

feat:bug修改

parent d1a57666
......@@ -769,7 +769,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
dto.setAvatar(StringUtils.isBlank(dto.getAvatar()) ? midRelatedDto.getAvatar() : dto.getAvatar());
dto.setMemberUnionidRelatedId(midRelatedDto.getMemberUnionidRelatedId());
if (StringUtils.isAnyBlank(dto.getExternalUserid(),dto.getSelfExternalUserid())) {
if (StringUtils.isAnyBlank(dto.getExternalUserid(), dto.getSelfExternalUserid())) {
log.error("加好友异常、请检查配置是否正常(如:检查客户联系回调、老好办助手回调、代开发回调(是否配置多个回调、企微权限是否正常、密钥是否正确)、好办权限等),wxEnterpriseId:{}", wxEnterpriseId);
return null;
}
......@@ -2014,9 +2014,9 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
wxEnterpriseService.updateUseridFlagById(2, null, wxEnterpriseId);
JSONObject jsonObject = new JSONObject();
jsonObject.put("corpid",corpid);
jsonObject.put("wxEnterpriseId",wxEnterpriseId);
jsonObject.put("secret",secretSetting.getSecretVal());
jsonObject.put("corpid", corpid);
jsonObject.put("wxEnterpriseId", wxEnterpriseId);
jsonObject.put("secret", secretSetting.getSecretVal());
GicMQClient clientInstance = GICMQClientUtil.getClientInstance();
try {
clientInstance.sendMessage("updateNewUseridCorpidMq", jsonObject.toJSONString());
......@@ -2033,7 +2033,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
log.error("传入为空");
return;
}
log.info("转换corpid、userid start params:{}",params);
log.info("转换corpid、userid start params:{}", params);
JSONObject jsonObject = JSON.parseObject(params);
String wxEnterpriseId = jsonObject.getString("wxEnterpriseId");
String corpid = jsonObject.getString("corpid");
......@@ -2045,7 +2045,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
rateLimiter.trySetRate(RateType.OVERALL, 5, 1, RateIntervalUnit.SECONDS);
BasePageInfo basePageInfo = new BasePageInfo();
int pageNum = 1;
while (true){
while (true) {
rateLimiter.acquire();
basePageInfo.setPageNum(pageNum);
basePageInfo.setPageSize(1000);
......@@ -2064,10 +2064,10 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
for (QywxNewUseridDTO qywxNewUseridDTO : qywxNewUseridDTOList) {
String userid = qywxNewUseridDTO.getUserid();
String openUserid = qywxNewUseridDTO.getOpen_userid();
log.info("转换新的userid,userid:{},openUserid:{}",userid,openUserid);
staffService.updateUserIdByUserId(wxEnterpriseId,openUserid,userid);
log.info("转换新的userid,userid:{},openUserid:{}", userid, openUserid);
staffService.updateUserIdByUserId(wxEnterpriseId, openUserid, userid);
}
pageNum ++;
pageNum++;
}
//更新导购员工关联关系表
......@@ -2080,13 +2080,14 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
externalClerkRelatedService.updateUserIdByWxEnterpriseId(wxEnterpriseId);
//更新自建外部联系人id
memberUnionRelatedService.updateExternalUseridByWxEnterpriseId(wxEnterpriseId);
log.info("转换corpid、userid end params:{}",params);
log.info("转换corpid、userid end params:{}", params);
//迁移完成
updateUseridFlagById(wxEnterpriseId,corpid);
updateUseridFlagById(wxEnterpriseId, corpid);
}
/**
* 迁移完成
*
* @param wxEnterpriseId
* @param corpid
*/
......@@ -2095,16 +2096,16 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String openCorpid = qywxUserApiService.toOpenCorpid(corpid, serviceCorpid);
TabHaobanWxApplication tabHaobanWxApplication = wxApplicationMapper.selectByCorpId(corpid, 3);
if (tabHaobanWxApplication == null) {
log.info("代开发应用不存在:{}",corpid);
return;
log.info("代开发应用不存在:{}", corpid);
return;
}
wxApplicationMapper.updateCorpidById(tabHaobanWxApplication.getWxApplicationId(),openCorpid);
String[] openidType = {"1","3"};
String[] openidType = {"1", "3"};
//调用完成接口
boolean flag = qywxUserApiService.finishOpenidMigration(corpid, serviceCorpid, tabHaobanWxApplication.getAgentId(), openidType);
if (flag) {
wxApplicationMapper.updateCorpidById(tabHaobanWxApplication.getWxApplicationId(), openCorpid);
wxEnterpriseService.updateUseridFlagById(1, openCorpid, wxEnterpriseId);
}else {
} else {
wxEnterpriseService.updateUseridFlagById(3, openCorpid, wxEnterpriseId);
}
String lockKey = "updateNewUseridCorpid_" + 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