Commit e09a2f6c by 徐高华

多人活码更新

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