|
|
@@ -694,9 +694,8 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
|
|
|
}
|
|
|
}
|
|
|
try {
|
|
|
- List<String> followIds = Jsons.parseList(corpFollowActiveCode.getFollowStr(), String.class);
|
|
|
//对客户进行标记
|
|
|
- markAddUserTag(corpFollowActiveCode.getMarkTag(), message.getToUserName(), corpUserInfo.getExternalUserId(), followIds, followedUsers);
|
|
|
+ markAddUserTag(corpFollowActiveCode.getMarkTag(), message);
|
|
|
state = corpFollowActiveCode.getMarkTag();
|
|
|
} catch (Exception e) {
|
|
|
}
|
|
|
@@ -877,9 +876,12 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
|
|
|
/**
|
|
|
* 创建标签 并标记客户
|
|
|
*/
|
|
|
- public void markAddUserTag(String tagName, String corpId, String externalUserId, List<String> relateFollowIds, List<FollowedUser> followedUsers) {
|
|
|
+ public void markAddUserTag(String tagName, CorpXmlMessage message) {
|
|
|
//对客户进行标记
|
|
|
//查询对应标签是否存在
|
|
|
+ String corpId = message.getToUserName();
|
|
|
+ String externalUserId = message.getExternalUserId();
|
|
|
+ String followId = message.getUserId();
|
|
|
CorpTag corpTag = corpTagMapper.selectOne(Wrappers.lambdaQuery(CorpTag.class)
|
|
|
.eq(CorpTag::getName, tagName).last("limit 1"));
|
|
|
if (corpTag == null) {
|
|
|
@@ -891,15 +893,7 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
|
|
|
if (corpTag != null) {
|
|
|
List<String> tag = List.of(corpTag.getTagId());
|
|
|
try {
|
|
|
- followedUsers.forEach(follow -> {
|
|
|
- if (!relateFollowIds.contains(follow.getUserId())) {
|
|
|
- return;
|
|
|
- }
|
|
|
- try {
|
|
|
- wxCorpOps.markTag(externalUserId, follow.getUserId(), tag.toArray(new String[tag.size()]), null);
|
|
|
- } catch (Exception e) {
|
|
|
- }
|
|
|
- });
|
|
|
+ wxCorpOps.markTag(externalUserId, followId, tag.toArray(new String[tag.size()]), null);
|
|
|
} catch (Exception e) {
|
|
|
}
|
|
|
|