Commit e09a2f6c by 徐高华

多人活码更新

parent d4e816df
......@@ -285,7 +285,7 @@ public class HmClerkRelationServiceImpl implements HmClerkRelationService {
GicMQClient clientInstance = GICMQClientUtil.getClientInstance();
try {
clientInstance.sendBatchMessages("departmentSyncDealMq", listRet, 10);
clientInstance.sendBatchMessages("departmentSyncDealMq", listRet, 1);
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -385,11 +385,17 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
return ServiceResponse.success();
}
@Autowired
public ServiceResponse batchUpdateHm(HmQrcodeQDTO qdto) {
String wxEnterpriseId = qdto.getWxEnterpriseId();
Long hmId = qdto.getHmId();
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId);
List<String> inClerkIdList = qdto.getClerkIdList() ;
List<String> userIds = staffClerkRelationService.listWxUserIdByClerkIds(inClerkIdList, wxEnterpriseId);
if (CollectionUtils.isEmpty(userIds)) {
return ServiceResponse.failure(Convert.toStr(HaoBanErrCodeCommon.ERR_8.getCode()), "导购未关联好办");
}
qdto.setClerkIdList(userIds);
HmQrcodeBO hm = hmQrcodeService.queryById(hmId);
List<String> clerkIdList = this.setStoreClerk(qdto, wxEnterpriseId, hmId, hm.getHmType(), false);
if (CollectionUtils.isEmpty(clerkIdList)) {
......@@ -402,11 +408,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
qywxExternalcontactDTO.setSkipVerify(hm.getPassFlag() == 1);
qywxExternalcontactDTO.setState("HM" + hmId);
qywxExternalcontactDTO.setConfigId(hm.getWxConfigId());
List<String> userIds = staffClerkRelationService.listWxUserIdByClerkIds(clerkIdList, wxEnterpriseId);
if (CollectionUtils.isEmpty(userIds)) {
return ServiceResponse.failure(Convert.toStr(HaoBanErrCodeCommon.ERR_8.getCode()), "导购未关联好办");
}
qywxExternalcontactDTO.setUser(userIds);
qywxExternalcontactDTO.setUser(clerkIdList);
QywxResponseDTO qywxResponseDTO = qywxUserApiService.updateContactWay(qwDTO.getThirdCorpid(), qwDTO.getSelf3thSecret(), qywxExternalcontactDTO,qwDTO.isSelf(),qwDTO.getUrlHost());
if (qywxResponseDTO.getErrcode() != 0) {
logger.error("更新企微活码失败");
......
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