三七 před 1 týdnem
rodič
revize
e9a8bba7d9

+ 28 - 2
fs-admin/src/main/java/com/fs/qw/controller/SopUserLogsController.java

@@ -4,7 +4,10 @@ package com.fs.qw.controller;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.core.page.TableDataInfo;
+import com.fs.qw.mapper.QwUserMapper;
 import com.fs.qw.param.SopUserLogsVO;
+import com.fs.sop.domain.QwSop;
+import com.fs.sop.mapper.QwSopMapper;
 import com.fs.sop.params.SopUserLogsParam;
 import com.fs.sop.service.ISopUserLogsService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -29,14 +32,37 @@ public class SopUserLogsController extends BaseController
     @Autowired
     private ISopUserLogsService sopUserLogsService;
 
+    @Autowired
+    private QwSopMapper sopMapper;
+
+    @Autowired
+    private QwUserMapper qwUserMapper;
+
+
     /**
      * 查询sopUserLogs列表
      */
     @GetMapping("/list")
     public TableDataInfo list(SopUserLogsParam sopUserLogs)
     {
-        startPage();
-        List<SopUserLogsVO> list = sopUserLogsService.selectSopUserLogsList(sopUserLogs);
+
+        QwSop qwSop = sopMapper.selectQwSopById(sopUserLogs.getSopId());
+        Integer filterMode = qwSop.getFilterMode();
+
+        List<SopUserLogsVO> list=null;
+        if(filterMode == null || filterMode == 1){
+            startPage();
+            list = sopUserLogsService.selectSopUserLogsList(sopUserLogs);
+        }else {
+            startPage();
+            list = sopUserLogsService.selectSopUserLogsGroupListByParam(sopUserLogs);
+        }
+
+
+        list.forEach(item->{
+            item.setQwUserName(qwUserMapper.selectQwUserByQwUserIdAndCorpId(item.getQwUserId(), item.getCorpId()));
+        });
+
         return getDataTable(list);
     }
 

+ 3 - 1
fs-company/src/main/java/com/fs/company/controller/baidu/Conversion.java

@@ -17,7 +17,9 @@ import java.util.List;
 public class Conversion {
     @Autowired
     private BaiduApiService conversionDataService;
-    @Value("${baidu.token}")
+
+//    @Value("${baidu.token}")
+    @Value("12345649")
     private String token;
     /**
      * 发送单个转换数据

+ 20 - 2
fs-company/src/main/java/com/fs/company/controller/qw/SopUserLogsController.java

@@ -11,13 +11,16 @@ import com.fs.framework.service.TokenService;
 import com.fs.qw.mapper.QwUserMapper;
 import com.fs.qw.param.SopUserLogsVO;
 import com.fs.qw.service.IQwUserService;
+import com.fs.sop.domain.QwSop;
 import com.fs.sop.domain.SopUserLogs;
+import com.fs.sop.mapper.QwSopMapper;
 import com.fs.sop.params.SopUserLogsParam;
 import com.fs.sop.service.ISopUserLogsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -38,6 +41,9 @@ public class SopUserLogsController extends BaseController
     @Autowired
     private QwUserMapper qwUserMapper;
 
+    @Autowired
+    private QwSopMapper sopMapper;
+
     /**
      * 查询sopUserLogs列表
      */
@@ -45,12 +51,24 @@ public class SopUserLogsController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(SopUserLogsParam sopUserLogs)
     {
-        startPage();
         sopUserLogs.setStatus(1);
-        List<SopUserLogsVO> list = sopUserLogsService.selectSopUserLogsList(sopUserLogs);
+
+        QwSop qwSop = sopMapper.selectQwSopById(sopUserLogs.getSopId());
+        Integer filterMode = qwSop.getFilterMode();
+
+        List<SopUserLogsVO> list=null;
+        if(filterMode == null || filterMode == 1){
+            startPage();
+             list = sopUserLogsService.selectSopUserLogsList(sopUserLogs);
+        }else {
+            startPage();
+            list = sopUserLogsService.selectSopUserLogsGroupListByParam(sopUserLogs);
+        }
+
         list.forEach(item->{
             item.setQwUserName(qwUserMapper.selectQwUserByQwUserIdAndCorpId(item.getQwUserId(), item.getCorpId()));
         });
+
         return getDataTable(list);
     }
 

+ 0 - 6
fs-qw-api-msg/src/main/java/com/fs/app/controller/imgTest.java

@@ -1,11 +1,5 @@
 package com.fs.app.controller;
 
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.fs.app.config.ConfigProperties;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;

+ 1 - 0
fs-service/src/main/java/com/fs/sop/domain/SopUserLogsInfo.java

@@ -46,6 +46,7 @@ public class SopUserLogsInfo implements Serializable {
 
     @TableField(exist = false)
     private Integer filterMode;
+
     @TableField(exist = false)
     private String chatId;
     @TableField(exist = false)

+ 1 - 0
fs-service/src/main/java/com/fs/sop/service/ISopUserLogsService.java

@@ -28,6 +28,7 @@ public interface ISopUserLogsService {
     public List<SopUserLogs> selectSopUserLogsList(SopUserLogs sopUserLogs);
 
     public List<SopUserLogsVO> selectSopUserLogsList(SopUserLogsParam param);
+    public List<SopUserLogsVO> selectSopUserLogsGroupListByParam(SopUserLogsParam param);
 
     public String selectSopUserLogsByUpdate(SopUserLogs sopUserLogs);
 

+ 12 - 8
fs-service/src/main/java/com/fs/sop/service/impl/SopUserLogsServiceImpl.java

@@ -617,14 +617,17 @@ public class SopUserLogsServiceImpl  implements ISopUserLogsService {
 
     @Override
     public List<SopUserLogsVO> selectSopUserLogsList(SopUserLogsParam param) {
-        QwSop qwSop = sopMapper.selectQwSopById(param.getSopId());
-        Integer filterMode = qwSop.getFilterMode();
-        List<SopUserLogsVO> list;
-        if(filterMode == null || filterMode == 1){
-            list = sopUserLogsMapper.selectSopUserLogsListByParam(param);
-        }else{
-            list = sopUserLogsMapper.selectSopUserLogsGroupListByParam(param);
-        }
+        List<SopUserLogsVO> list = sopUserLogsMapper.selectSopUserLogsListByParam(param);
+        return resultSopUserLogsList(list);
+    }
+
+    @Override
+    public List<SopUserLogsVO> selectSopUserLogsGroupListByParam(SopUserLogsParam param) {
+        List<SopUserLogsVO> list = sopUserLogsMapper.selectSopUserLogsGroupListByParam(param);
+        return resultSopUserLogsList(list);
+    }
+
+    private List<SopUserLogsVO> resultSopUserLogsList( List<SopUserLogsVO> list){
         List<String> chatIdList = PubFun.listToNewList(list, SopUserLogsVO::getChatId);
         if(!chatIdList.isEmpty()){
             List<QwGroupChat> qwGroupChatList = qwGroupChatService.selectQwGroupChatByChatIds(chatIdList.toArray(new String[0]));
@@ -633,6 +636,7 @@ public class SopUserLogsServiceImpl  implements ISopUserLogsService {
                 e.setChatName(groupChatMap.get(e.getChatId()).getName());
             });
         }
+
         return list;
     }
 

+ 5 - 1
fs-service/src/main/resources/mapper/sop/QwSopMapper.xml

@@ -17,6 +17,7 @@
         <result property="tags"    column="tags"    />
         <result property="excludeTags"    column="exclude_tags"    />
         <result property="startTime"    column="start_time"  />
+        <result property="filterMode"    column="filter_mode"  />
         <result property="filterType"    column="filter_type"    />
         <result property="tempId"    column="temp_id"    />
         <result property="corpId"    column="corp_id"    />
@@ -34,7 +35,10 @@
     </resultMap>
 
     <sql id="selectQwSopVo">
-        select *  from qw_sop
+        select id,name,status,type,qw_user_ids,create_by,create_time,company_id,send_type,tags,exclude_tags,start_time,
+               filter_mode,filter_type,temp_id,corp_id,expiry_time,is_auto_sop,auto_sop_time,min_conversion_day,
+               max_conversion_day,min_send,max_send,stop_time,is_rating,course_day,open_comment_status
+        from qw_sop
     </sql>
 
     <select id="selectQwSopAutoByTagsByForeach"  resultType="com.fs.qw.vo.QwSopRuleTimeVO">