Browse Source

Merge remote-tracking branch 'origin/master'

xgb 1 week ago
parent
commit
6b6553f680

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

@@ -2,6 +2,7 @@ package com.fs.app.controller;
 
 
 import cn.hutool.core.date.DateUtil;
+import com.alibaba.fastjson.JSON;
 import com.fs.app.taskService.*;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.domain.ResponseResult;

+ 1 - 1
fs-service/src/main/java/com/fs/course/mapper/FsUserCourseVideoMapper.java

@@ -145,7 +145,7 @@ public interface FsUserCourseVideoMapper
     Long selectFsUserCourseVideoByCourseSort(@Param("courseId")Long courseId, @Param("courseSort")Long courseSort);
 
 
-    @Select("select video_id dict_value, title dict_label  from fs_user_course_video where course_id=#{id} and is_del = 0 order by course_sort")
+    @Select("select video_id dict_value, title dict_label , thumbnail  dict_img_url from fs_user_course_video where course_id=#{id} and is_del = 0 order by course_sort")
     List<OptionsVO> selectFsUserCourseVodeAllList(Long id);
 
     @Select({"<script> " +

+ 18 - 3
fs-service/src/main/java/com/fs/sop/service/impl/QwSopTempServiceImpl.java

@@ -7,6 +7,7 @@ import com.fs.common.annotation.DataSource;
 import com.fs.common.enums.DataSourceType;
 import com.fs.common.exception.base.BaseException;
 import com.fs.common.utils.PubFun;
+import com.fs.config.cloud.CloudHostProper;
 import com.fs.course.config.CourseConfig;
 import com.fs.course.domain.FsUserCourse;
 import com.fs.course.domain.FsUserCourseVideo;
@@ -34,6 +35,8 @@ import lombok.AllArgsConstructor;
 import org.apache.commons.beanutils.ConvertUtils;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.rocketmq.spring.core.RocketMQTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -55,6 +58,10 @@ import java.util.stream.Collectors;
 @AllArgsConstructor
 public class QwSopTempServiceImpl implements IQwSopTempService
 {
+
+    @Autowired
+    private CloudHostProper cloudHostProper;
+
     private final QwSopTempMapper qwSopTempMapper;
     private final FastGptChatReplaceWordsMapper fastGptChatReplaceWordsMapper;
     private final IQwSopTempRulesService qwSopTempRulesService;
@@ -69,7 +76,6 @@ public class QwSopTempServiceImpl implements IQwSopTempService
     private final IQwSopService qwSopService;
     private final IQwUserService qwUserService;
 
-
     /**
      * 查询sop模板
      *
@@ -460,10 +466,19 @@ public class QwSopTempServiceImpl implements IQwSopTempService
                 QwSopTempSetting2.Content.Setting setting = new QwSopTempSetting2.Content.Setting();
                 setting.setLinkTitle(e.getTitle());
                 setting.setMiniprogramTitle(e.getTitle());
-                setting.setMiniprogramPicUrl(fsUserCourse.getImgUrl());
+
+                //用课节图片做封面
+                if("今正科技".equals(cloudHostProper.getCompanyName())){
+                    setting.setMiniprogramPicUrl(!StringUtil.isNullOrEmpty(e.getThumbnail())?e.getThumbnail():fsUserCourse.getImgUrl());
+                    setting.setLinkImageUrl(!StringUtil.isNullOrEmpty(e.getThumbnail())?e.getThumbnail():fsUserCourse.getImgUrl());
+                }else {
+                    setting.setMiniprogramPicUrl(fsUserCourse.getImgUrl());
+                    setting.setLinkImageUrl(fsUserCourse.getImgUrl());
+
+                }
+
                 setting.setIsBindUrl(1);
                 setting.setLinkDescribe(e.getTitle());
-                setting.setLinkImageUrl(fsUserCourse.getImgUrl());
                 setting.setContentType("4");
                 content.setContent(JSON.toJSONString(setting));
                 content.setIsBindUrl(1);