Bläddra i källkod

Merge branch 'cpq-dev' of wangfan/adweb3-server into master

chenpeiqing 3 veckor sedan
förälder
incheckning
172cb66ded

+ 8 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebEnquiryServiceImpl.java

@@ -466,13 +466,19 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
       log.info("发送询盘邮件--站点邮箱:{}", emailStr);
       log.info("发送询盘邮件--子账户邮箱:{}", FastJsonUtil.toJSONString(principalEmailMap));
 
-      List<String> emailList = JSON.parseArray(emailStr, String.class);
+      List<String> emailList = new ArrayList<>();
+      if (StringUtils.isNotBlank(emailStr)) {
+        emailList = JSON.parseArray(emailStr, String.class);
+      }
+
       SysUser sysUser = sysUserService.getById(adwebEnquiry.getUid());
 
-      if (sysUser != null) {
+      if (sysUser != null && !emailList.contains(sysUser.getEmail())) {
         emailList.add(sysUser.getEmail());
       }
 
+      log.info("发送询盘邮件--站点包含用户邮箱:{}", FastJsonUtil.toJSONString(emailList));
+
       if (CollectionUtils.isEmpty(emailList)) {
         log.error("该站点未配置主账号邮箱和站点邮箱");
         return;

+ 3 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mq/EnquiryReceiver.java

@@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.jeecg.boot.starter.rabbitmq.core.BaseRabbiMqHandler;
 import org.jeecg.boot.starter.rabbitmq.listenter.MqListener;
 import org.jeecg.common.annotation.RabbitComponent;
+import org.jeecg.common.util.FastJsonUtil;
 import org.jeecg.modules.adweb.common.service.FeishuService;
 import org.jeecg.modules.adweb.common.util.AdwebRedisUtil;
 import org.jeecg.modules.adweb.enquiry.dto.EnquiryDTO;
@@ -74,6 +75,8 @@ public class EnquiryReceiver extends BaseRabbiMqHandler<List<EnquiryDTO>> {
                 // 消息内容唯一性判断
                 List<String> enquiryUniqueIds =
                     (List<String>) adwebRedisUtil.get(EnquiryUniqueKey + enquiry.getSiteHost());
+
+                log.info("询盘唯一性存储条件:{}", FastJsonUtil.toJSONString(enquiryUniqueIds));
                 // 如果该消息内容原数据中已存在,则将该重复消息踢出队列
                 if (enquiryUniqueIds.contains(enquiry.getSiteHost() + enquiry.getRecordId())) {
                   log.info("该询盘已经消费过,从队列中清除:{}", enquiry.getRecordId());