Browse Source

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_java

caoliqin 1 day ago
parent
commit
9da80a471f

+ 11 - 0
fs-qw-task/src/main/java/com/fs/app/controller/CommonController.java

@@ -31,6 +31,7 @@ import com.fs.sop.service.*;
 import com.fs.sop.vo.QwSopLogsDoSendListTVO;
 import com.fs.store.service.IFsUserCourseCountService;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -123,6 +124,16 @@ public class CommonController {
     private SyncQwExternalContactService syncQwExternalContactService;
 
 
+
+    /**
+     * 获取跳转微信小程序的链接地址
+     */
+    @GetMapping("/getGotoWxAppLink")
+    @ApiOperation("获取跳转微信小程序的链接地址")
+    public ResponseResult<String> getGotoWxAppLink(String linkStr,String appid) {
+        return ResponseResult.ok(courseLinkService.getGotoWxAppLink(linkStr,appid));
+    }
+
     /**
     * 发官方通连
     */

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

@@ -1968,6 +1968,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         sopLogs.setExternalUserId(externalContact.getExternalUserId());
         sopLogs.setExternalUserName(externalContact.getName());
         sopLogs.setFsUserId(finishLog.getUserId() != null ? finishLog.getUserId() : null );
+        sopLogs.setExternalId(finishLog.getQwExternalContactId());
         sopLogs.setUserLogsId("-");
 
         sopLogs.setQwUserKey(finishLog.getQwUserId() != null ? finishLog.getQwUserId() : null);

+ 10 - 3
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -561,7 +561,8 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             }
 
             log.setUpdateTime(new Date());
-//            fsUserCompanyBindService.bindFsUser(fsUser.getUserId(), qwExternalId, log.getLogId());
+            //重粉逻辑
+            fsUserCompanyBindService.bindFsUser(param.getUserId(), qwExternalId, log.getLogId());
             courseWatchLogMapper.updateFsCourseWatchLog(log);
 
         }else {
@@ -580,7 +581,8 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             log.setUpdateTime(new Date());
             courseWatchLogMapper.updateFsCourseWatchLog(log);
         }
-//        fsUserCompanyBindService.bindFsUser(fsUser.getUserId(), qwExternalId, log.getLogId());
+        //重粉逻辑
+        fsUserCompanyBindService.bindFsUser(param.getUserId(), qwExternalId, log.getLogId());
         return R.error(567,"群聊通用链接").put("qwExternalId", qwExternalContact.getId());
     }
     private R handleRoom(FsUserCourseVideoAddKfUParam param,FsUser user) {
@@ -783,6 +785,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
 
             iSopUserLogsInfoService.updateSopUserInfoByExternalId(qwExternalId,param.getUserId());
 
+            //重粉逻辑
             fsUserCompanyBindService.bindFsUser(param.getUserId(), qwExternalId, log.getLogId());
 
 
@@ -821,6 +824,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             log.setUpdateTime(new Date());
             courseWatchLogMapper.updateFsCourseWatchLog(log);
 
+            //重粉逻辑
             fsUserCompanyBindService.bindFsUser(param.getUserId(), qwExternalId, log.getLogId());
 
 
@@ -1480,7 +1484,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             Company company = companyMapper.selectCompanyById(param.getCompanyId());
             BigDecimal money = company.getMoney();
             if (money.compareTo(BigDecimal.ZERO)<=0) {
-                return R.error("服务商余额不足,请联系群主服务充值!");
+                return R.error("服务商余额不足,请联系群主服务充值!");
             }
 
             // 发送红包
@@ -1715,6 +1719,9 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
         FsUserCourseVideoDetailsVO fsUserCourseVideoDetailsVO = new FsUserCourseVideoDetailsVO();
         BeanUtils.copyProperties(fsUserCourseVideo, fsUserCourseVideoDetailsVO);
 
+        //这里 改成取线路一值,返回给前端。VideoUrl 是原视频(用来算流量的),不要去改,lineOne是转码后的视频
+        fsUserCourseVideoDetailsVO.setVideoUrl(fsUserCourseVideo.getLineOne());
+
         // 获取课程相关的题库
         String questionBankId = fsUserCourseVideo.getQuestionBankId();
         List<FsUserVideoQuestionVO> questionList = Collections.emptyList();

+ 2 - 0
fs-service/src/main/java/com/fs/qw/mapper/QwExternalContactMapper.java

@@ -262,6 +262,7 @@ public interface QwExternalContactMapper extends BaseMapper<QwExternalContact> {
             "            <if test=\"customerId != null \"> and ec.customer_id = #{customerId}</if>\n" +
             "            <if test=\"status != null \"> and ec.status = #{status}</if>\n" +
             "            <if test=\"stageStatus != null \"> and ec.stage_status = #{stageStatus}</if>\n" +
+            "            <if test=\"userRepeat != null \"> and ec.user_repeat = #{userRepeat}</if>\n" +
             "            <if test=\"transferStatus != null \"> and ec.transfer_status = #{transferStatus}</if>\n" +
             "            <if test=\"qwUserId != null \"> and ec.qw_user_id = #{qwUserId}</if>\n" +
             "            <if test=\"level != null \"> and ec.level = #{level}</if>\n" +
@@ -323,6 +324,7 @@ public interface QwExternalContactMapper extends BaseMapper<QwExternalContact> {
             "            <if test=\"customerId != null \"> and ec.customer_id = #{customerId}</if>\n" +
             "            <if test=\"status != null \"> and ec.status = #{status}</if>\n" +
             "            <if test=\"stageStatus != null \"> and ec.stage_status = #{stageStatus}</if>\n" +
+            "            <if test=\"userRepeat != null \"> and ec.user_repeat = #{userRepeat}</if>\n" +
             "            <if test=\"transferStatus != null \"> and ec.transfer_status = #{transferStatus}</if>\n" +
             "            <if test=\"qwUserId != null \"> and ec.qw_user_id = #{qwUserId}</if>\n" +
             "            <if test=\"level != null \"> and ec.level = #{level}</if>\n" +

+ 6 - 0
fs-service/src/main/java/com/fs/qw/param/QwExternalContactParam.java

@@ -38,6 +38,12 @@ public class QwExternalContactParam {
     private String companyUserName;
 
 
+    /**
+     * 是否重粉
+     */
+    private Integer userRepeat;
+
+
     private Long customerId;
 
     /** 名称 */

+ 5 - 2
fs-service/src/main/resources/mapper/course/FsCourseWatchLogMapper.xml

@@ -70,8 +70,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          LEFT JOIN qw_user qu on qu.id= l.qw_user_id
          LEFT JOIN qw_external_contact qec on l.qw_external_contact_id = qec.id
         <where>
-            <if test ='maps.isVip !=null'>
-                and l.user_id != 0 and u.is_vip = #{maps.isVip}
+            <if test ='maps.isVip != null and maps.isVip == 0'>
+                and (l.user_id = #{maps.isVip} or l.user_id is null)
+            </if>
+            <if test ='maps.isVip != null and maps.isVip == 1'>
+                and l.user_id != 0 and l.user_id is not null
             </if>
             <if test ='maps.sendType !=null'>
                 and l.send_type = #{maps.sendType}