|
@@ -57,6 +57,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import java.net.http.HttpRequest;
|
|
import java.net.http.HttpRequest;
|
|
|
import java.net.http.HttpResponse;
|
|
import java.net.http.HttpResponse;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
+import java.util.concurrent.atomic.AtomicBoolean;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
import java.util.stream.Stream;
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
|
@@ -676,6 +677,7 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
|
|
|
corpUser.setType(corpUserInfo.getType());
|
|
corpUser.setType(corpUserInfo.getType());
|
|
|
String state = message.getState();
|
|
String state = message.getState();
|
|
|
CorpFollowActiveCode corpFollowActiveCode = null;
|
|
CorpFollowActiveCode corpFollowActiveCode = null;
|
|
|
|
|
+ AtomicBoolean isSendWelcomeMsg = new AtomicBoolean(false);
|
|
|
if (StrUtil.isNotBlank(state) && state.contains(Constant.AC_CODE_KEY)) {
|
|
if (StrUtil.isNotBlank(state) && state.contains(Constant.AC_CODE_KEY)) {
|
|
|
//查找对应的活动活码 记录
|
|
//查找对应的活动活码 记录
|
|
|
String acIdStr = StrUtil.subAfter(state, StrUtil.C_COLON, true);
|
|
String acIdStr = StrUtil.subAfter(state, StrUtil.C_COLON, true);
|
|
@@ -689,6 +691,7 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
|
|
|
//欢迎语模板id
|
|
//欢迎语模板id
|
|
|
Long msgId = corpFollowActiveCode.getMsgId();
|
|
Long msgId = corpFollowActiveCode.getMsgId();
|
|
|
sendWelcomeMsg(msgId, message);
|
|
sendWelcomeMsg(msgId, message);
|
|
|
|
|
+ isSendWelcomeMsg.set(true);
|
|
|
try {
|
|
try {
|
|
|
//对客户进行标记
|
|
//对客户进行标记
|
|
|
markAddUserTag(corpFollowActiveCode.getMarkTag(), message);
|
|
markAddUserTag(corpFollowActiveCode.getMarkTag(), message);
|
|
@@ -705,6 +708,7 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
|
|
|
THREAD_POOL.execute(()->{
|
|
THREAD_POOL.execute(()->{
|
|
|
saveAcqusitionCallback(customer, corpUser, message);
|
|
saveAcqusitionCallback(customer, corpUser, message);
|
|
|
});
|
|
});
|
|
|
|
|
+ isSendWelcomeMsg.set(true);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//扫码来源
|
|
//扫码来源
|
|
@@ -791,7 +795,7 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//若没找到规则的欢迎语 发送默认欢迎语
|
|
//若没找到规则的欢迎语 发送默认欢迎语
|
|
|
- if (StrUtil.isNotEmpty(message.getWelcomeCode())) {
|
|
|
|
|
|
|
+ if (StrUtil.isNotEmpty(message.getWelcomeCode()) && !isSendWelcomeMsg.get()) {
|
|
|
CorpWelcomeTemplate corpWelcomeTemplate = corpWelcomeTemplateMapper.selectOne(Wrappers.lambdaQuery(CorpWelcomeTemplate.class)
|
|
CorpWelcomeTemplate corpWelcomeTemplate = corpWelcomeTemplateMapper.selectOne(Wrappers.lambdaQuery(CorpWelcomeTemplate.class)
|
|
|
.eq(CorpWelcomeTemplate::getType, 0)
|
|
.eq(CorpWelcomeTemplate::getType, 0)
|
|
|
.eq(CorpWelcomeTemplate::getDeleted, 1)
|
|
.eq(CorpWelcomeTemplate::getDeleted, 1)
|
|
@@ -1081,7 +1085,6 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
|
|
|
if (StrUtil.isNotBlank(welcomeContent) || StrUtil.isNotBlank(attachmentsStr)) {
|
|
if (StrUtil.isNotBlank(welcomeContent) || StrUtil.isNotBlank(attachmentsStr)) {
|
|
|
THREAD_POOL.execute(() -> {
|
|
THREAD_POOL.execute(() -> {
|
|
|
senCorpWelcomeMsg(message, welcomeContent, attachmentsStr);
|
|
senCorpWelcomeMsg(message, welcomeContent, attachmentsStr);
|
|
|
- message.setWelcomeCode(null);
|
|
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|