Преглед изворни кода

测试环境配置提交、优化ipad发送小程序逻辑适配销售公司、qwtask生成记录优化避免群聊生成发送个人记录

yjwang пре 1 дан
родитељ
комит
ef0cfebb85

+ 13 - 34
fs-ipad-task/src/main/java/com/fs/app/service/IpadSendServer.java

@@ -119,43 +119,22 @@ public class IpadSendServer {
                                             log.info("ID:{}, qwUserId:{},externalId:{},发送用户看过的备用小程序:{}",
                                                     vo.getId(), vo.getQwUserId(), vo.getExId(), appid);
                                         } else {
-                                            //用户没看过这个备用小程序,用第一个正常的
-                                            Optional<FsCoursePlaySourceConfig> normal = configList.stream()
-                                                    .filter(e -> e.getStatus() != null && e.getStatus() == 0)
-                                                    .findFirst();
-
-                                            if (normal.isPresent()) {
-                                                appid = normal.get().getAppid();
-                                                log.info("ID:{}, qwUserId:{},externalId:{},发送用户看过的正常小程序:{}",
-                                                        vo.getId(), vo.getQwUserId(), vo.getExId(), appid);
-                                            } else {
-                                                //用户没看过任何正常小程序,只能用备用小程序
-                                                appid = backupAppId;
-                                                log.info("ID:{}, qwUserId:{},externalId:{},发送备用小程序(用户没看过):{}",
-                                                        vo.getId(), vo.getQwUserId(), vo.getExId(), appid);
-                                            }
+                                            //用户没看过任何正常小程序,只能用备用小程序
+                                            appid = backupAppId;
+                                            log.info("ID:{}, qwUserId:{},externalId:{},发送备用小程序(用户没看过):{}",
+                                                    vo.getId(), vo.getQwUserId(), vo.getExId(), appid);
                                         }
                                     } else {
-                                        Optional<FsCoursePlaySourceConfig> normal = configList.stream()
-                                                .filter(e -> e.getStatus() != null && e.getStatus() == 0)
-                                                .findFirst();
-
-                                        if (normal.isPresent()) {
-                                            appid = normal.get().getAppid();
-                                            log.info("ID:{}, qwUserId:{},externalId:{},发送用户看过的正常小程序(无备用):{}",
+                                        List<CompanyMiniapp> mainList = list.stream()
+                                                .filter(e -> Integer.valueOf(0).equals(e.getType()))
+                                                .collect(Collectors.toList());
+                                        if(!mainList.isEmpty()){
+                                            appid =  mainList.get(0).getAppId();
+                                            log.info("ID:{}, qwUserId:{},externalId:{},发送主要小程序:{}",
+                                                    vo.getId(), vo.getQwUserId(), vo.getExId(), appid);
+                                        }else {
+                                            log.info("ID:{}, qwUserId:{},externalId:{},销售公司没可用小程序:{}",
                                                     vo.getId(), vo.getQwUserId(), vo.getExId(), appid);
-                                        } else {
-                                            List<CompanyMiniapp> mainList = list.stream()
-                                                    .filter(e -> Integer.valueOf(0).equals(e.getType()))
-                                                    .collect(Collectors.toList());
-                                            if(!mainList.isEmpty()){
-                                                appid =  mainList.get(0).getAppId();
-                                                log.info("ID:{}, qwUserId:{},externalId:{},发送主要小程序:{}",
-                                                        vo.getId(), vo.getQwUserId(), vo.getExId(), appid);
-                                            }else {
-                                                log.info("ID:{}, qwUserId:{},externalId:{},销售公司没可用小程序:{}",
-                                                        vo.getId(), vo.getQwUserId(), vo.getExId(), appid);
-                                            }
                                         }
                                     }
                                 }

+ 1 - 1
fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java

@@ -318,7 +318,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
             groupChatMap = PubFun.listToMapByGroupObject(qwGroupChatList, QwGroupChat::getChatId);
         }
 
-        Map<String, List<SopUserLogsVo>> sopLogsGroupedById = sopUserLogsVos.stream()
+        Map<String, List<SopUserLogsVo>> sopLogsGroupedById = sopUserLogsVos.stream().filter(e -> e.getFilterMode() == 1 || (e.getFilterMode() == 2 && e.getChatId() != null))
                 .collect(Collectors.groupingBy(SopUserLogsVo::getSopId));
 
         // 查询公司关联小程序数据

+ 4 - 0
fs-service/src/main/java/com/fs/sop/vo/SopUserLogsVo.java

@@ -48,4 +48,8 @@ public class SopUserLogsVo  {
      */
     private Integer isSampSend;
 
+    /**
+     * 筛筛选方式1标签2群聊
+     * **/
+    private Integer filterMode;
 }

+ 14 - 16
fs-service/src/main/resources/application-dev-yjb.yml

@@ -1,13 +1,11 @@
 # 数据源配置
 spring:
     profiles:
-        include: common,config-dev-yjb
-#    profiles:
-#        include: config-dev,common
+        include: config-druid-yjb,common
     # redis 配置
     redis:
         # 地址
-        host: localhost
+        host: 127.0.0.1
         # 端口,默认为6379
         port: 6379
         # 数据库索引
@@ -33,16 +31,16 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                    url: jdbc:mysql://nj-cdb-6306xy90.sql.tencentcdb.com:27077/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: yjb
-                    password: Ylrz_1q2w3e4r5t6y
+                    url: jdbc:mysql://139.186.77.83:3306/yjb_his_scrm_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: Rtroot
+                    password: Rtroot
                 # 从库数据源
                 slave:
                     # 从数据源开关/默认关闭
                     enabled: true
-                    url: jdbc:mysql://nj-cdb-6306xy90.sql.tencentcdb.com:27077/fs_his?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: yjb
-                    password: Ylrz_1q2w3e4r5t6y
+                    url: jdbc:mysql://139.186.77.83:3306/yjb_his_scrm_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: Rtroot
+                    password: Rtroot
                 # 初始连接数
                 initialSize: 5
                 # 最小连接池数量
@@ -88,15 +86,15 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                    url: jdbc:mysql://nj-cdb-6306xy90.sql.tencentcdb.com:27077/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: yjb
-                    password: Ylrz_1q2w3e4r5t6y
+                    url: jdbc:mysql://139.186.77.83:3306/yjb_fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: Rtroot
+                    password: Rtroot
                 read:
                     # 从数据源开关/默认关闭
                     enabled: true
-                    url: jdbc:mysql://nj-cdb-6306xy90.sql.tencentcdb.com:27077/fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: yjb
-                    password: Ylrz_1q2w3e4r5t6y
+                    url: jdbc:mysql://139.186.77.83:3306/yjb_fs_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: Rtroot
+                    password: Rtroot
                 # 初始连接数
                 initialSize: 5
                 # 最小连接池数量