Browse Source

Changes 增加消息提醒规则

cyan 1 month ago
parent
commit
931441c4d8

+ 2 - 2
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/wechatgroup/mapper/xml/OkkiShopWechatGroupMsgMapper.xml

@@ -79,10 +79,10 @@
     <select id="getLatestWechatMsgList" resultType="org.jeecg.modules.okki.wechatgroup.entity.OkkiShopWechatGroupMsg">
     <select id="getLatestWechatMsgList" resultType="org.jeecg.modules.okki.wechatgroup.entity.OkkiShopWechatGroupMsg">
         SELECT
         SELECT
             CASE
             CASE
-            WHEN LOWER(t1.from_id) IN
+            WHEN (LOWER(t1.from_id) IN
         <foreach item="enName" collection="enNames"  open="(" separator="," close=")">
         <foreach item="enName" collection="enNames"  open="(" separator="," close=")">
             LOWER(#{enName})
             LOWER(#{enName})
-        </foreach> AND t1.from_id LIKE '%@xiaoman.cn' THEN '我'
+        </foreach> or t1.from_id LIKE '%@xiaoman.cn') THEN '我'
             ELSE '客户'
             ELSE '客户'
             END AS from_id,
             END AS from_id,
             t1.content,
             t1.content,

+ 1 - 1
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/wechatgroup/service/impl/OkkiShopWechatGroupMsgServiceImpl.java

@@ -501,7 +501,7 @@ public class OkkiShopWechatGroupMsgServiceImpl extends ServiceImpl<OkkiShopWecha
 
 
         StringBuilder sb = new StringBuilder();
         StringBuilder sb = new StringBuilder();
         shopWechatGroupMsgList.forEach(c -> {
         shopWechatGroupMsgList.forEach(c -> {
-            sb.append("发送内容:")
+            sb.append(c.getFromId()).append(":")
                     .append(c.getContent()).append(",")
                     .append(c.getContent()).append(",")
                     .append("发送时间:")
                     .append("发送时间:")
                     .append(DateUtil.format(c.getMsgTime(), DatePattern.CHINESE_DATE_TIME_FORMATTER))
                     .append(DateUtil.format(c.getMsgTime(), DatePattern.CHINESE_DATE_TIME_FORMATTER))