Browse Source

迁移广告

吴树波 3 months ago
parent
commit
c956e26343

+ 3 - 3
fs-admin/src/main/resources/application-dev.yml

@@ -83,9 +83,9 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                    url: jdbc:mysql://42.194.245.189:3306/test_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: root
-                    password: YJF_2024
+                    url: jdbc:mysql://139.186.77.83:3306/sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: Rtroot
+                    password: Rtroot
                 # 初始连接数
                 initialSize: 5
                 # 最小连接池数量

+ 3 - 3
fs-company/src/main/resources/application-dev.yml

@@ -81,9 +81,9 @@ spring:
             druid:
                 # 主库数据源
                 master:
-                    url: jdbc:mysql://42.194.245.189:3306/test_his_sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: root
-                    password: YJF_2024
+                    url: jdbc:mysql://139.186.77.83:3306/sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                    username: Rtroot
+                    password: Rtroot
                 # 初始连接数
                 initialSize: 5
                 # 最小连接池数量

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

@@ -2,6 +2,7 @@ package com.fs.app.taskService.impl;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.fs.app.taskService.SopLogsTaskService;
 import com.fs.common.utils.BatchUtils;
@@ -82,6 +83,8 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
     private QwSopTagMapper qwSopTagMapper ;
     @Autowired
     private QwSopMapper sopMapper;
+    @Autowired
+    private IQwExternalContactService qwExternalContactService;
 
     @Autowired
     private FsCourseWatchLogMapper fsCourseWatchLogMapper;
@@ -128,8 +131,6 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
 
     @Autowired
     private ICompanyUserService companyUserService;
-    @Autowired
-    private IQwExternalContactService qwExternalContactService;
 
     @PostConstruct
     public void init() {
@@ -501,6 +502,13 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                         userLogsInfo.setUserLogsId(logVo.getId());
 
                         List<SopUserLogsInfo> sopUserLogsInfos = sopUserLogsInfoMapper.selectSopUserLogsInfoList(userLogsInfo);
+                        if(logVo.getIsRegister() == 1){
+                            List<Long> externalContactIdList = PubFun.listToNewList(sopUserLogsInfos, SopUserLogsInfo::getExternalId);
+                            List<QwExternalContact> list = qwExternalContactService.list(new QueryWrapper<QwExternalContact>().isNotNull("fs_user_id").in("id", externalContactIdList));
+                            Map<Long, QwExternalContact> map = PubFun.listToMapByGroupObject(list, QwExternalContact::getId);
+                            sopUserLogsInfos = sopUserLogsInfos.stream().filter(e -> map.containsKey(e.getExternalId())).collect(Collectors.toList());
+                        }
+
 
                         // 获取fsUserId
                         Set<Long> externalIds = sopUserLogsInfos.stream().map(SopUserLogsInfo::getExternalId).collect(Collectors.toSet());

+ 5 - 0
fs-service-system/src/main/java/com/fs/qw/param/QwAutoTagsRulesTags.java

@@ -2,14 +2,19 @@ package com.fs.qw.param;
 
 import lombok.Data;
 
+import java.time.LocalDate;
 import java.util.List;
 
 @Data
 public class QwAutoTagsRulesTags {
     private List<String> tags;
+    private List<LocalDate> date;
+    private LocalDate startDate;
+    private LocalDate endDate;
     private List<Integer> week;
     private String startTime;
     private String endTime;
     private String remarks;
     private Integer isDay;
+    private Integer everyDay;
 }

File diff suppressed because it is too large
+ 229 - 226
fs-service-system/src/main/java/com/fs/qw/service/impl/QwExternalContactServiceImpl.java


+ 19 - 0
fs-service-system/src/main/java/com/fs/sop/domain/QwSop.java

@@ -1,5 +1,7 @@
 package com.fs.sop.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fs.common.annotation.Excel;
 import lombok.Data;
@@ -17,6 +19,7 @@ public class QwSop implements Serializable
 {
 
     /** id */
+    @TableId(type = IdType.UUID)
     private String id;
 
     /** 规则名称 */
@@ -91,4 +94,20 @@ public class QwSop implements Serializable
 
     private Integer courseDay;
 
+
+    // 是否固定营期
+    private Integer isFixed;
+    // 是否只发送注册用户
+    private Integer isRegister;
+    // 进入营期打标签开始时间
+    private Integer startDayNum;
+    // 进入营期打标签结束时间
+    private Integer endDayNum;
+    // 添加的标签
+    private String addTags;
+    // 第几天开始发课
+    private Integer courseDateNum;
+    // 新课对话模板
+    private String newTemplateId;
+
 }

+ 3 - 0
fs-service-system/src/main/java/com/fs/sop/mapper/QwSopMapper.java

@@ -360,4 +360,7 @@ public interface QwSopMapper extends BaseMapper<QwSop> {
     @DataSource(DataSourceType.SOP)
     @Select("select * FROM qw_sop where is_rating = 1 and send_type in(2,3) and min_conversion_day is not null and max_conversion_day is not null order by create_time desc")
     List<QwSop> selectQwSopByIsRatingNotNull();
+
+
+
 }

+ 7 - 3
fs-service-system/src/main/java/com/fs/sop/service/impl/QwSopServiceImpl.java

@@ -1,7 +1,9 @@
 package com.fs.sop.service.impl;
 
 import com.alibaba.fastjson.JSON;
+import com.fs.common.annotation.DataSource;
 import com.fs.common.core.domain.R;
+import com.fs.common.enums.DataSourceType;
 import com.fs.common.exception.base.BaseException;
 import com.fs.common.utils.PubFun;
 import com.fs.common.utils.StringUtils;
@@ -149,12 +151,13 @@ public class QwSopServiceImpl implements IQwSopService
      * @return 结果
      */
     @Override
+    @DataSource(DataSourceType.SOP)
     public int insertQwSop(QwSop qwSop)
     {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         qwSop.setCreateTime(sdf.format(new Date()));
 
-        return qwSopMapper.insertQwSop(qwSop);
+        return qwSopMapper.insert(qwSop);
     }
 
     /**
@@ -164,13 +167,14 @@ public class QwSopServiceImpl implements IQwSopService
      * @return 结果
      */
     @Override
+    @DataSource(DataSourceType.SOP)
     public R updateQwSop(QwSop qwSop)
     {
 
         try {
 
             if (qwSop.getExpiryTime()!=null||qwSop.getIsRating()!=null){
-                qwSopMapper.updateQwSop(qwSop);
+                qwSopMapper.updateById(qwSop);
                 return R.ok("修改成功");
             }
 
@@ -178,7 +182,7 @@ public class QwSopServiceImpl implements IQwSopService
                 return R.error("sop编号或模板编号不能为空");
             }
 
-            int i = qwSopMapper.updateQwSop(qwSop);
+            int i = qwSopMapper.updateById(qwSop);
             if (i > 0) {
 
                     try {

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

@@ -34,4 +34,9 @@ public class SopUserLogsVo  {
      */
     private String domain;
 
+    // 是否固定营期
+    private Integer isFixed;
+    // 是否只发送注册用户
+    private Integer isRegister;
+
 }

+ 1 - 1
fs-service-system/src/main/resources/mapper/sop/SopUserLogsMapper.xml

@@ -158,7 +158,7 @@
 
 
     <select id="selectSopUserLogsListByTime" resultType="com.fs.sop.vo.SopUserLogsVo">
-        select a.*,b.min_conversion_day,b.max_conversion_day,b.min_send,b.max_send from sop_user_logs a
+        select a.*,b.min_conversion_day,b.max_conversion_day,b.min_send,b.max_send,b.is_fixed,b.is_register from sop_user_logs a
         inner join qw_sop b on a.sop_id = b.id
         where a.start_time &lt;= Now() and a.status = 1 and b.send_type != 4 and b.status in (2,3)
     </select>

Some files were not shown because too many files changed in this diff