Commit fa417e17 by 墨竹

Merge branch 'fixbug_0706' into developer

parents 06912c13 2199a536
......@@ -34,13 +34,13 @@ import com.gic.wechat.api.dto.qywx.response.QywxResponseDTO;
import com.gic.wechat.api.service.qywx.QywxSuiteApiService;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
import com.google.common.collect.Sets;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.concurrent.TimeUnit;
......@@ -494,8 +494,12 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
jsonObject.put("suiteId", wxSuiteid);
jsonObject.put("wxUserId", wxUserId);
jsonObject.put("externalUserId", externalUserId);
if (CollectionUtils.isNotEmpty(needSetTags)) {
jsonObject.put("needSetTags", StringUtils.join(needSetTags, ","));
}
if (CollectionUtils.isNotEmpty(needDelTags)) {
jsonObject.put("needDelTags", StringUtils.join(needDelTags, ","));
}
GicMQClient clientInstance = GICMQClientUtil.getClientInstance();
try {
logger.info("qywxMarkTagMq 该用户打标签:{}",jsonObject.toJSONString());
......@@ -933,7 +937,15 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
logger.error("企微打标签超过最大次数,key:{}", key);
return;
}
QywxResponseDTO responseDTO = qywxUserApiService.markTag(corpid, suiteId, wxUserId, externalUserId, Arrays.asList(needSetTags.split(",")), Arrays.asList(needDelTags.split(",")));
List<String> needSetTagList = new ArrayList<>();
List<String> needDelTagList = new ArrayList<>();
if (StringUtils.isNotBlank(needSetTags)) {
needSetTagList = Arrays.asList(needSetTags.split(","));
}
if (StringUtils.isNotBlank(needDelTags)) {
needDelTagList = Arrays.asList(needDelTags.split(","));
}
QywxResponseDTO responseDTO = qywxUserApiService.markTag(corpid, suiteId, wxUserId, externalUserId, needSetTagList, needDelTagList);
logger.info("操作返回:{}", JSONObject.toJSONString(responseDTO));
if (responseDTO.getErrcode() != 0) {
logger.info("权限不对,重试三次:{},{}", wxUserId, externalUserId);
......
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