فهرست منبع

Merge remote-tracking branch 'origin/master'

xw 4 هفته پیش
والد
کامیت
c5b09a3df5
24فایلهای تغییر یافته به همراه453 افزوده شده و 40 حذف شده
  1. 3 1
      fs-admin/src/main/java/com/fs/course/controller/FsUserCourseCategoryController.java
  2. 13 1
      fs-admin/src/main/java/com/fs/course/controller/FsUserCourseVideoController.java
  3. 3 1
      fs-admin/src/main/java/com/fs/course/controller/FsVideoResourceController.java
  4. 9 1
      fs-admin/src/main/java/com/fs/his/controller/FsIntegralOrderController.java
  5. 1 1
      fs-company/src/main/java/com/fs/company/controller/live/LiveController.java
  6. 11 5
      fs-company/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java
  7. 8 0
      fs-service/src/main/java/com/fs/config/cloud/CloudHostProper.java
  8. 50 0
      fs-service/src/main/java/com/fs/course/config/CourseConfig.java
  9. 8 0
      fs-service/src/main/java/com/fs/course/domain/FsUserCourseComment.java
  10. 3 1
      fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java
  11. 7 2
      fs-service/src/main/java/com/fs/his/service/impl/FsStoreAfterSalesServiceImpl.java
  12. 30 0
      fs-service/src/main/java/com/fs/hisStore/config/StoreConfig.java
  13. 16 9
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java
  14. 2 1
      fs-service/src/main/java/com/fs/live/service/impl/LiveOrderServiceImpl.java
  15. 2 0
      fs-service/src/main/resources/application-config-druid-bjzm-test.yml
  16. 2 0
      fs-service/src/main/resources/application-config-druid-bjzm.yml
  17. 8 1
      fs-service/src/main/resources/mapper/course/FsUserCourseCategoryMapper.xml
  18. 8 9
      fs-service/src/main/resources/mapper/course/FsUserCourseMapper.xml
  19. 8 1
      fs-service/src/main/resources/mapper/his/FsIntegralOrderMapper.xml
  20. 129 1
      fs-user-app/src/main/java/com/fs/app/controller/CourseCommentController.java
  21. 2 2
      fs-user-app/src/main/java/com/fs/app/controller/course/CourseQwController.java
  22. 1 1
      fs-user-app/src/main/java/com/fs/app/controller/live/LiveOrderController.java
  23. 128 1
      fs-user-app/src/main/java/com/fs/app/controller/store/CourseCommentScrmController.java
  24. 1 1
      fs-user-app/src/main/java/com/fs/app/controller/store/PayScrmController.java

+ 3 - 1
fs-admin/src/main/java/com/fs/course/controller/FsUserCourseCategoryController.java

@@ -183,7 +183,9 @@ public class FsUserCourseCategoryController extends BaseController
 	@DeleteMapping("/{cateIds}")
     public AjaxResult remove(@PathVariable Long[] cateIds)
     {
-        if ("北京卓美".equals(cloudHostProper.getCompanyName())) {
+        String configJson = configService.selectConfigByKey("course.config");
+        CourseConfig courseConfig = JSONUtil.toBean(configJson, CourseConfig.class);
+        if (courseConfig != null && Boolean.TRUE.equals(courseConfig.getEnableCategoryDeleteCheck())) {
             for (Long cateId : cateIds) {
                 if (cateId == null) {
                     continue;

+ 13 - 1
fs-admin/src/main/java/com/fs/course/controller/FsUserCourseVideoController.java

@@ -120,6 +120,16 @@ public class FsUserCourseVideoController extends BaseController
         return AjaxResult.success(fsUserCourseVideoService.selectFsUserCourseVideoByVideoIdVO(videoId,null));
     }
 
+    /**
+     * 获取课堂视频详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('course:userCourseVideo:query')")
+    @GetMapping(value = "/public/{videoId}")
+    public AjaxResult getPublicInfo(@PathVariable("videoId") Long videoId)
+    {
+        return AjaxResult.success(fsUserCourseVideoService.selectFsUserCourseVideoByVideoIdVO(videoId,null));
+    }
+
     /**
      * 新增课堂视频
      */
@@ -223,7 +233,9 @@ public class FsUserCourseVideoController extends BaseController
 	@DeleteMapping("/{videoIds}")
     public AjaxResult remove(@PathVariable String[] videoIds)
     {
-        if ("北京卓美".equals(companyName) && videoIds != null && videoIds.length > 0) {
+        String configJson = configService.selectConfigByKey("course.config");
+        CourseConfig courseConfig = JSONUtil.toBean(configJson, CourseConfig.class);
+        if (courseConfig != null && Boolean.TRUE.equals(courseConfig.getEnableVideoDeleteOnShelfCheck()) && videoIds != null && videoIds.length > 0) {
             int onShelf = fsUserCourseVideoMapper.countOnShelfCourseByVideoIds(videoIds);
             if (onShelf > 0) {
                 return AjaxResult.error("内容有上架状态,请先修改启用状态");

+ 3 - 1
fs-admin/src/main/java/com/fs/course/controller/FsVideoResourceController.java

@@ -190,7 +190,9 @@ public class FsVideoResourceController extends BaseController {
     @Log(title = "视频素材库", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
-        if ("北京卓美".equals(cloudHostProper.getCompanyName()) && ids != null && ids.length > 0) {
+        String configJson = configService.selectConfigByKey("course.config");
+        CourseConfig courseConfig = JSONUtil.toBean(configJson, CourseConfig.class);
+        if (courseConfig != null && Boolean.TRUE.equals(courseConfig.getEnableResourceDeleteCourseCheck()) && ids != null && ids.length > 0) {
             int linked = fsUserCourseVideoMapper.countCourseVideoByVideoResourceIds(ids);
             if (linked > 0) {
                 return AjaxResult.error("素材有关联课程,不能删除");

+ 9 - 1
fs-admin/src/main/java/com/fs/his/controller/FsIntegralOrderController.java

@@ -17,6 +17,9 @@ import com.fs.common.utils.StringUtils;
 import com.fs.common.utils.poi.ExcelUtil;
 import com.fs.common.utils.uuid.IdUtils;
 import com.fs.config.cloud.CloudHostProper;
+import cn.hutool.json.JSONUtil;
+import com.fs.hisStore.config.StoreConfig;
+import com.fs.system.service.ISysConfigService;
 import com.fs.his.domain.*;
 import com.fs.his.dto.ExpressInfoDTO;
 import com.fs.his.enums.ShipperCodeEnum;
@@ -77,6 +80,9 @@ public class FsIntegralOrderController extends BaseController
     @Autowired
     private FsIntegralOrderMapper fsIntegralOrderMapper;
 
+    @Autowired
+    private ISysConfigService configService;
+
     /**
      * 查询积分商品订单列表
      */
@@ -174,7 +180,9 @@ public class FsIntegralOrderController extends BaseController
                 // 加密手机号
 
                 // 260506 积分订单没有接入erp 暂时这么处理 卓美 需要对订单进行发货处理
-                if (!"北京卓美".equals(cloudHostProper.getCompanyName())) {
+                String hisStoreJson = configService.selectConfigByKey("his.store");
+                StoreConfig storeConfig = JSONUtil.toBean(hisStoreJson, StoreConfig.class);
+                if (storeConfig == null || !Boolean.TRUE.equals(storeConfig.getEnableIntegralOrderPhoneDecrypt())) {
                     vo.setUserPhone(decryptAutoPhoneMk(vo.getUserPhone()));
                 }
             }

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/live/LiveController.java

@@ -71,7 +71,7 @@ public class LiveController extends BaseController
     {
         startPage();
         List<Live> list = new ArrayList<>();
-        if (CloudHostUtils.hasCloudHostName("济世百康","蒙牛") ) {
+        if (CloudHostUtils.hasCloudHostName("济世百康") ) {
             //直播也发
             list = liveService.listToLiveNoEndNew(live);
         }else{

+ 11 - 5
fs-company/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java

@@ -133,14 +133,16 @@ public class FsStoreOrderScrmController extends BaseController
         }
         startPage();
 
-        if("北京卓美".equals(cloudHostProper.getCompanyName())){
+        String configJson = configService.selectConfigByKey("his.store");
+        StoreConfig storeConfig = JSONUtil.toBean(configJson, StoreConfig.class);
+        if(storeConfig != null && Boolean.TRUE.equals(storeConfig.getEnableCompanyOrderMode())){
             if(!"00".equals(loginUser.getUser().getUserType())){//非管理员看见自己数据
                 param.setCompanyUserId(loginUser.getUser().getUserId());
             }
             param.setIsCompanyOrder(1);//是否销售订单
         }
-
-
+        
+        
         if(!StringUtils.isEmpty(param.getCreateTimeRange())){
             param.setCreateTimeList(param.getCreateTimeRange().split("--"));
         }
@@ -218,7 +220,9 @@ public class FsStoreOrderScrmController extends BaseController
         if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
             param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
         }
-        if("北京卓美".equals(cloudHostProper.getCompanyName())){
+        String configJson = configService.selectConfigByKey("his.store");
+        StoreConfig storeConfig = JSONUtil.toBean(configJson, StoreConfig.class);
+        if(storeConfig != null && Boolean.TRUE.equals(storeConfig.getEnableCompanyOrderMode())){
             if(!"00".equals(loginUser.getUser().getUserType())){//非管理员看见自己数据
                 param.setCompanyUserId(loginUser.getUser().getUserId());
             }
@@ -537,7 +541,9 @@ public class FsStoreOrderScrmController extends BaseController
         if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
             param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
         }
-        if("北京卓美".equals(cloudHostProper.getCompanyName())){
+        String configJson = configService.selectConfigByKey("his.store");
+        StoreConfig storeConfig = JSONUtil.toBean(configJson, StoreConfig.class);
+        if(storeConfig != null && Boolean.TRUE.equals(storeConfig.getEnableCompanyOrderMode())){
             if(!"00".equals(loginUser.getUser().getUserType())){//非管理员看见自己数据
                 param.setCompanyUserId(loginUser.getUser().getUserId());
             }

+ 8 - 0
fs-service/src/main/java/com/fs/config/cloud/CloudHostProper.java

@@ -31,6 +31,14 @@ public class CloudHostProper {
     @Value("${cloud_host.volcengineUrl}")
     public String volcengineUrl;
 
+    //评论内容URL替换-源地址
+    @Value("${cloud_host.commentContentReplaceFrom:}")
+    public String commentContentReplaceFrom;
+
+    //评论内容URL替换-目标地址
+    @Value("${cloud_host.commentContentReplaceTo:}")
+    public String commentContentReplaceTo;
+
 //    @Value("${cloud_host.accessKey}")
 //    public String accessKey;
 //

+ 50 - 0
fs-service/src/main/java/com/fs/course/config/CourseConfig.java

@@ -115,6 +115,56 @@ public class CourseConfig implements Serializable {
     // 是否发课不发群  false否,true 是
     private Boolean roomLinkAllow;
 
+    /**
+     * 是否开启评论内容脱敏过滤
+     */
+    private Boolean enableCommentWordFilter;
+
+    /**
+     * 是否开启分类删除时校验关联课程/素材
+     */
+    private Boolean enableCategoryDeleteCheck;
+
+    /**
+     * 是否开启课程列表绑定用户校验
+     */
+    private Boolean enableCourseUserBinding;
+
+    /**
+     * 是否开启看课展示商品
+     */
+    private Boolean enableCourseGoodsShow;
+
+    /**
+     * 是否开启视频删除上架校验
+     */
+    private Boolean enableVideoDeleteOnShelfCheck;
+
+    /**
+     * 是否开启素材删除关联课程校验
+     */
+    private Boolean enableResourceDeleteCourseCheck;
+
+    /**
+     * 是否开启看课视频有效期校验
+     */
+    private Boolean enableVideoExpiredCheck;
+
+    /**
+     * 是否展示看课Tab-评价得积分
+     */
+    private Boolean showTabReviewPoints;
+
+    /**
+     * 是否展示看课Tab-栏目介绍
+     */
+    private Boolean showTabColumnIntro;
+
+    /**
+     * 是否展示看课Tab-精选留言
+     */
+    private Boolean showTabFeaturedComments;
+
 
     @Data
     public static class DisabledTimeVo{

+ 8 - 0
fs-service/src/main/java/com/fs/course/domain/FsUserCourseComment.java

@@ -50,4 +50,12 @@ public class FsUserCourseComment extends BaseEntity
 
     private Integer isDel;
 
+    /** 图片URL列表(JSON数组) */
+    @Excel(name = "图片")
+    private String images;
+
+    /** 视频URL列表(JSON数组) */
+    @Excel(name = "视频")
+    private String videos;
+
 }

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

@@ -2787,7 +2787,9 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
             }
         }
 
-        if ("北京卓美".equals(signProjectName)) {
+        String videoCheckJson = configService.selectConfigByKey("course.config");
+        CourseConfig videoCheckConfig = JSONUtil.toBean(videoCheckJson, CourseConfig.class);
+        if (videoCheckConfig != null && Boolean.TRUE.equals(videoCheckConfig.getEnableVideoExpiredCheck())) {
             FsUserCourseVideoH5VO checkVideo = fsUserCourseMapper.selectFsUserCourseVideoH5VOByVideoId(param.getVideoId());
             if (checkVideo == null
                     || (checkVideo.getIsDel() != null && checkVideo.getIsDel() == 1)

+ 7 - 2
fs-service/src/main/java/com/fs/his/service/impl/FsStoreAfterSalesServiceImpl.java

@@ -631,8 +631,13 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService {
                 // 处理微信退款
                 WxPayService wxPayService = getWxPayService(fsPayConfig);
                 WxPayRefundRequest refundRequest = new WxPayRefundRequest();
-                refundRequest.setOutTradeNo("storeOrder"+"-"+payment.getPayCode());
-                refundRequest.setOutRefundNo("storeOrder"+"-"+payment.getPayCode());
+                refundRequest.setOutTradeNo(orderType+"-"+payment.getPayCode());
+                refundRequest.setOutRefundNo(orderType+"-"+payment.getPayCode());
+                if(payment.getBusinessType() == 2) {
+                    // 处方单的药品订单,走storeOrder
+                    refundRequest.setOutTradeNo("storeOrder" + "-" + payment.getPayCode());
+                    refundRequest.setOutRefundNo("storeOrder" + "-" + payment.getPayCode());
+                }
                 refundRequest.setTotalFee(WxPayUnifiedOrderRequest.yuanToFen(payment.getPayMoney().toString()));
                 refundRequest.setRefundFee(WxPayUnifiedOrderRequest.yuanToFen(payment.getPayMoney().toString()));
                 try {

+ 30 - 0
fs-service/src/main/java/com/fs/hisStore/config/StoreConfig.java

@@ -29,4 +29,34 @@ public class StoreConfig implements Serializable {
     private Boolean scanCodeDiscountEnabled;//是否开启扫码立减金
     private BigDecimal scanCodeDiscountAmount;//扫码立减金额
     private Boolean checkStock;//是否检查库存,默认关闭
+
+    /**
+     * 是否开启销售订单模式(非管理员仅看自己数据+标记为销售订单)
+     */
+    private Boolean enableCompanyOrderMode;
+
+    /**
+     * 是否开启订单关联课程视频
+     */
+    private Boolean enableOrderCourseBinding;
+
+    /**
+     * 是否开启订单绑定销售
+     */
+    private Boolean enableOrderSalesBinding;
+
+    /**
+     * 是否开启运费模板校验
+     */
+    private Boolean enablePostageCheck;
+
+    /**
+     * 是否开启运费加入订单金额
+     */
+    private Boolean enablePostageAddToTotal;
+
+    /**
+     * 是否开启积分订单手机号解密
+     */
+    private Boolean enableIntegralOrderPhoneDecrypt;
 }

+ 16 - 9
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java

@@ -1069,7 +1069,9 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
                 storeOrder.setCompanyUserId(param.getCompanyUserId());
             }
 
-            if ("北京卓美".equals(companyName) && param.getVideoId()!=null){
+            String hisStoreJson = configService.selectConfigByKey("his.store");
+            StoreConfig hisStoreConfig = JSONUtil.toBean(hisStoreJson, StoreConfig.class);
+            if (hisStoreConfig != null && Boolean.TRUE.equals(hisStoreConfig.getEnableOrderCourseBinding()) && param.getVideoId()!=null){
                 storeOrder.setVideoId(param.getVideoId());
                 storeOrder.setCourseId(param.getCourseId());
                 storeOrder.setPeriodId(param.getPeriodId());
@@ -1077,9 +1079,9 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
             }
             String json = configService.selectConfigByKey("store.config");
             StoreConfig config= JSONUtil.toBean(json, StoreConfig.class);
-
+            
             //卓美商城正常下单
-            if("北京卓美".equals(companyName) && param.getVideoId()!=null && storeOrder.getCompanyId() == null || !"北京卓美".equals(companyName)){
+            if(hisStoreConfig != null && Boolean.TRUE.equals(hisStoreConfig.getEnableOrderSalesBinding())){
                 //绑定销售
                 FsUserScrm fsuser= userService.selectFsUserById(userId);
                 if(ObjectUtil.isEmpty(config.getOrderAttribution())
@@ -1492,7 +1494,9 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
                 if(param.getCompanyUserId()!=null){
                     storeOrder.setCompanyUserId(param.getCompanyUserId());
                 }
-                if ("北京卓美".equals(companyName) && param.getVideoId()!=null){
+                String hisStoreJson = configService.selectConfigByKey("his.store");
+                StoreConfig hisStoreConfig = JSONUtil.toBean(hisStoreJson, StoreConfig.class);
+                if (hisStoreConfig != null && Boolean.TRUE.equals(hisStoreConfig.getEnableOrderCourseBinding()) && param.getVideoId()!=null){
                     storeOrder.setVideoId(param.getVideoId());
                     storeOrder.setCourseId(param.getCourseId());
                     storeOrder.setPeriodId(param.getPeriodId());
@@ -1500,9 +1504,9 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
                 }
                 String json = configService.selectConfigByKey("store.config");
                 StoreConfig config= JSONUtil.toBean(json, StoreConfig.class);
-    
+                    
                 //绑定销售
-                if("北京卓美".equals(companyName) && param.getVideoId()!=null && storeOrder.getCompanyId() == null || !("北京卓美").equals(companyName)){
+                if(hisStoreConfig != null && Boolean.TRUE.equals(hisStoreConfig.getEnableOrderSalesBinding())){
                     FsUserScrm fsuser= userService.selectFsUserById(userId);
                     if(ObjectUtil.isEmpty(config.getOrderAttribution())
                             ||!config.getOrderAttribution().equals(1)){
@@ -2371,6 +2375,9 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
         //计算金额
         FsStoreOrderScrm storeOrder = new FsStoreOrderScrm();
         String packageId = redisCache.getCacheObject("orderKey:" + param.getOrderKey());
+        //校验运费
+        String hisStoreJson2 = configService.selectConfigByKey("his.store");
+        StoreConfig hisStoreConfig2 = JSONUtil.toBean(hisStoreJson2, StoreConfig.class);
         if (packageId != null) {
             FsStoreProductPackageScrm storeProductPackage = productPackageService.selectFsStoreProductPackageById(param.getPackageId());
             if (storeProductPackage.getStatus().equals(0)) {
@@ -2432,8 +2439,8 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
                     }
                     cartService.checkProductStock(attrValue.getProductId(), attrValue.getId());
                 }
-                //校验运费
-                if ("北京卓美".equals(companyName)) {
+
+                if (hisStoreConfig2 != null && Boolean.TRUE.equals(hisStoreConfig2.getEnablePostageCheck())) {
                     try {
                         BigDecimal payPostage =getPayPostage(carts,address);
                         storeOrder.setPayPostage(payPostage);
@@ -2490,7 +2497,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
             }
 
             //如果运费存在加入运费金额
-            if("北京卓美".equals(companyName)){
+            if(hisStoreConfig2 != null && Boolean.TRUE.equals(hisStoreConfig2.getEnablePostageAddToTotal())){
                 if(storeOrder.getPayPostage().compareTo(BigDecimal.ZERO) == 1){
                     totalMoney = totalMoney.add(storeOrder.getPayPostage());
                 }

+ 2 - 1
fs-service/src/main/java/com/fs/live/service/impl/LiveOrderServiceImpl.java

@@ -4762,7 +4762,8 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
             // 更新商品库存
             fsStoreProductScrmMapper.incStockDecSales(Long.valueOf(liveOrder.getTotalNum()), fsStoreProduct.getProductId());
             goods.setStock(goods.getStock() + Long.parseLong(liveOrder.getTotalNum()));
-            // 更新商品库存
+            goods.setSales(goods.getSales() - Integer.parseInt(liveOrder.getTotalNum()));
+            // 更新直播商品库存
             liveGoodsMapper.updateLiveGoods(goods);
 
             // 退券

+ 2 - 0
fs-service/src/main/resources/application-config-druid-bjzm-test.yml

@@ -92,6 +92,8 @@ cloud_host:
   projectCode: BJZM
   spaceName:
   volcengineUrl: https://bjzmvolcengine.ylrztop.com
+  commentContentReplaceFrom: https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com
+  commentContentReplaceTo: http://bjzmkytcpv.ylrzcloud.com
 headerImg:
   imgUrl:
   download_poster_url: https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/security/2c47e4f105b641b4a49df50a77338e32.png

+ 2 - 0
fs-service/src/main/resources/application-config-druid-bjzm.yml

@@ -87,6 +87,8 @@ cloud_host:
   projectCode: BJZM
   spaceName:
   volcengineUrl: https://bjzmvolcengine.ylrztop.com
+  commentContentReplaceFrom: https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com
+  commentContentReplaceTo: http://bjzmkytcpv.ylrzcloud.com
 headerImg:
   imgUrl:
   download_poster_url: https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/security/2c47e4f105b641b4a49df50a77338e32.png

+ 8 - 1
fs-service/src/main/resources/mapper/course/FsUserCourseCategoryMapper.xml

@@ -38,7 +38,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          pid 有值:只查该一级下的二级;pid 无值:仅保留在公域课 fs_user_course 中 sub_cate_id 有上架使用 的二级 -->
     <select id="selectFsUserCourseCategoryAppList" parameterType="com.fs.course.param.FsUserCourseCategoryAppQueryParam" resultType="com.fs.course.domain.FsUserCourseCategory">
         SELECT
-         distinct c.cate_id, c.pid, c.cate_name, c.sort, c.is_show, c.create_time, c.update_time, c.is_del, c.cate_type
+         distinct
+        <if test="yxxTag != null and yxxTag == 1 and homePage != null and homePage == 1">
+            d.rec_home_course_top_sort,
+        </if>
+        <if test="yxxTag == null and homePage != null and homePage == 1">
+            d.rec_home_long_video_sort,
+        </if>
+        c.cate_id, c.pid, c.cate_name, c.sort, c.is_show, c.create_time, c.update_time, c.is_del, c.cate_type
         FROM fs_user_course_category c
         LEFT JOIN fs_user_course_category p ON p.cate_id = c.pid
         <if test="homePage != null and homePage == 1">

+ 8 - 9
fs-service/src/main/resources/mapper/course/FsUserCourseMapper.xml

@@ -407,14 +407,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         AND c.is_show = 1
         AND c.is_private = 0
 
-        <choose>
-            <when test="q.yxxTag != null and q.yxxTag == 1">
-                AND c.cate_id = (select cate_id from fs_user_course_category WHERE cate_name like '%央广原乡行%' AND cate_type = 1 limit 1)
-            </when>
-            <otherwise>
-                AND c.cate_id != (select cate_id from fs_user_course_category WHERE cate_name like '%央广原乡行%' AND cate_type = 1 limit 1)
-            </otherwise>
-        </choose>
+
+        <if test="q.yxxTag != null and q.yxxTag == 1">
+            AND c.cate_id = (select cate_id from fs_user_course_category WHERE cate_name like '%央广原乡行%' AND cate_type = 1 limit 1)
+        </if>
+        <if test="q.yxxTag == null">
+            AND c.cate_id != (select cate_id from fs_user_course_category WHERE cate_name like '%央广原乡行%' AND cate_type = 1 limit 1)
+        </if>
           AND EXISTS (
                 SELECT 1 FROM fs_user_course_category pc2
                 WHERE pc2.cate_id = c.cate_id AND pc2.cate_type = 1 AND pc2.is_del = 0
@@ -484,7 +483,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectDuplicateRecHomeLongVideoSort" resultType="com.fs.course.domain.FsUserCourse">
         SELECT course_id, course_name FROM fs_user_course
         WHERE is_del = 0
-        AND cate_id = #{cateId}
+
         AND rec_home_long_video_sort = #{recHomeLongVideoSort}
         <if test="excludeCourseId != null">
             AND course_id != #{excludeCourseId}

+ 8 - 1
fs-service/src/main/resources/mapper/his/FsIntegralOrderMapper.xml

@@ -26,10 +26,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="remark"    column="remark"    />
         <result property="barCode"    column="bar_code"    />
         <result property="loginAccount"    column="login_account"    />
+        <result property="itemCartJson"    column="item_cart_json"    />
+        <result property="integralByCart"    column="integral_by_cart"    />
+        <result property="barCodeCart"    column="bar_code_cart"    />
+        <result property="quantityCart"    column="quantity_cart"    />
     </resultMap>
 
     <sql id="selectFsIntegralOrderVo">
-        select order_id, order_code, user_id,bar_code, user_name, user_phone, user_address, item_json, integral,pay_money,is_pay,pay_time,pay_type, status, delivery_code, delivery_name, delivery_sn, delivery_time, create_time,qw_user_id,company_user_id,company_id,remark,login_account from fs_integral_order
+        select order_id, order_code, user_id,bar_code, user_name, user_phone, user_address, item_json, integral,pay_money,is_pay,pay_time,pay_type, status,
+               delivery_code, delivery_name, delivery_sn, delivery_time, create_time,qw_user_id,company_user_id,company_id,remark,login_account,
+               item_cart_json,integral_by_cart,bar_code_cart,quantity_cart
+        from fs_integral_order
     </sql>
 
     <select id="selectFsIntegralOrderList" parameterType="FsIntegralOrder" resultMap="FsIntegralOrderResult">

+ 129 - 1
fs-user-app/src/main/java/com/fs/app/controller/CourseCommentController.java

@@ -1,6 +1,7 @@
 package com.fs.app.controller;
 
 import com.fs.app.annotation.Login;
+import com.fs.app.controller.store.CourseCommentScrmController;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
@@ -24,6 +25,9 @@ import com.fs.course.param.FsUserCourseCommentUParam;
 import com.fs.course.service.IFsUserCourseService;
 import com.fs.config.cloud.CloudHostProper;
 import com.fs.sensitive.ProductionWordFilter;
+import com.fs.course.config.CourseConfig;
+import com.fs.system.service.ISysConfigService;
+import cn.hutool.json.JSONUtil;
 import com.fs.course.vo.FsUserCourseCommentListUVO;
 import com.fs.course.vo.FsUserCourseCommentReplyListUVO;
 import com.fs.course.vo.FsUserCourseCommentVO;
@@ -37,6 +41,8 @@ import lombok.Data;
 import lombok.Synchronized;
 import me.chanjar.weixin.common.util.DataUtils;
 import net.bytebuddy.implementation.bytecode.Throw;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
@@ -44,8 +50,15 @@ import org.springframework.util.unit.DataUnit;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
+import com.fs.common.utils.DateUtils;
+import com.fs.system.oss.CloudStorageService;
+import com.fs.system.oss.OSSFactory;
+import org.springframework.web.multipart.MultipartFile;
+
 import java.util.Date;
 import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
 
 /**
  * 课堂评论Controller
@@ -58,6 +71,9 @@ import java.util.List;
 @RequestMapping(value="/app/course/comment")
 public class CourseCommentController extends AppBaseController
 {
+
+    private static final Logger log = LoggerFactory.getLogger(CourseCommentController.class);
+
     @Autowired
     private IFsUserCourseCommentService fsUserCourseCommentService;
 
@@ -72,6 +88,9 @@ public class CourseCommentController extends AppBaseController
 
     @Autowired
     private ProductionWordFilter productionWordFilter;
+
+    @Autowired
+    private ISysConfigService configService;
     /**
      * 查询课堂评论列表
      */
@@ -115,7 +134,10 @@ public class CourseCommentController extends AppBaseController
     public R add(@RequestBody FsUserCourseCommentAddParam param)
     {
         String content = param.getContent();
-        if ("北京卓美".equals(cloudHostProper.getCompanyName())) {
+        // 判断是否开启评论内容脱敏过滤
+        String json = configService.selectConfigByKey("course.config");
+        CourseConfig courseConfig = JSONUtil.toBean(json, CourseConfig.class);
+        if (courseConfig != null && Boolean.TRUE.equals(courseConfig.getEnableCommentWordFilter())) {
             if (content == null) {
                 content = "";
             }
@@ -145,6 +167,112 @@ public class CourseCommentController extends AppBaseController
         return R.ok();
     }
 
+    /**
+     * 新增课堂评论(含图片视频)
+     */
+    @Login
+    @ApiOperation("新增课堂评论(含图片视频)")
+    @Transactional
+    @PostMapping("/addCommentWithMedia")
+    public R addWithMedia(
+            @RequestParam(value = "courseId") Long courseId,
+            @RequestParam(value = "type") Long type,
+            @RequestParam(value = "parentId", required = false) Long parentId,
+            @RequestParam(value = "content", required = false) String content,
+            @RequestParam(value = "toUserId", required = false) Long toUserId,
+            @RequestParam(value = "imageFiles", required = false) MultipartFile[] imageFiles,
+            @RequestParam(value = "videoFiles", required = false) MultipartFile[] videoFiles
+    ) throws Exception {
+        boolean b = redisCache.setIfAbsent("comment_" + courseId + "_" + getUserId(), 1, 10, TimeUnit.MINUTES);
+        if (!b) {
+            return R.error("请勿重复提交");
+        }
+        try {
+            // 判断是否开启评论内容脱敏过滤
+            String json = configService.selectConfigByKey("course.config");
+            CourseConfig courseConfig = JSONUtil.toBean(json, CourseConfig.class);
+            if (courseConfig != null && Boolean.TRUE.equals(courseConfig.getEnableCommentWordFilter())) {
+                if (content == null) {
+                    content = "";
+                }
+                String filtered = productionWordFilter.filter(content).getFilteredText();
+                if (StringUtils.isEmpty(filtered) && (imageFiles == null || imageFiles.length == 0) && (videoFiles == null || videoFiles.length == 0)) {
+                    return R.error("评论内容无效,请重新输入");
+                }
+                content = filtered;
+            }
+
+            // 上传图片,URL拼接到content末尾
+            if (imageFiles != null && imageFiles.length > 0) {
+                long imageMaxSize = 50 * 1024 * 1024L; // 50MB
+                for (MultipartFile imageFile : imageFiles) {
+                    if (imageFile.isEmpty()) {
+                        continue;
+                    }
+                    if (imageFile.getSize() > imageMaxSize) {
+                        return R.error("图片大小不能超过50MB");
+                    }
+                    String fileName = imageFile.getOriginalFilename();
+                    String suffix = fileName.substring(fileName.lastIndexOf("."));
+                    String datePath = DateUtils.dateTime();
+                    String uuid = UUID.randomUUID().toString().replaceAll("-", "");
+                    String path = "comment/image/" + datePath + "/" + uuid + suffix;
+                    CloudStorageService storage = OSSFactory.build();
+                    String url = storage.upload(imageFile.getBytes(), path);
+                    content = (content == null ? "" : content) + "\n" + url;
+                }
+            }
+
+            // 上传视频,URL拼接到content末尾
+            if (videoFiles != null && videoFiles.length > 0) {
+                long videoMaxSize = 100 * 1024 * 1024L; // 100MB
+                for (MultipartFile videoFile : videoFiles) {
+                    if (videoFile.isEmpty()) {
+                        continue;
+                    }
+                    if (videoFile.getSize() > videoMaxSize) {
+                        return R.error("视频大小不能超过100MB");
+                    }
+                    String fileName = videoFile.getOriginalFilename();
+                    String suffix = fileName.substring(fileName.lastIndexOf("."));
+                    String datePath = DateUtils.dateTime();
+                    String uuid = UUID.randomUUID().toString().replaceAll("-", "");
+                    String path = "comment/video/" + datePath + "/" + uuid + suffix;
+                    CloudStorageService storage = OSSFactory.build();
+                    String url = storage.upload(videoFile.getBytes(), path);
+                    content = (content == null ? "" : content) + "\n" + url;
+                }
+            }
+
+            FsUserCourseComment fsUserCourseComment = new FsUserCourseComment();
+            fsUserCourseComment.setUserId(Long.parseLong(getUserId()));
+            fsUserCourseComment.setCourseId(courseId);
+            if (StringUtils.isNotEmpty(cloudHostProper.getCommentContentReplaceFrom())) {
+                content = content.replace(cloudHostProper.getCommentContentReplaceFrom(), cloudHostProper.getCommentContentReplaceTo());
+            }
+            fsUserCourseComment.setContent(content);
+            fsUserCourseComment.setType(type);
+            if (type == 1) {
+                fsUserCourseComment.setParentId(0L);
+            } else {
+                fsUserCourseComment.setParentId(parentId);
+            }
+            fsUserCourseComment.setToUserId(toUserId);
+            fsUserCourseComment.setCreateTime(new Date());
+            fsUserCourseCommentService.insertFsUserCourseComment(fsUserCourseComment);
+            if (type == 2) {
+                fsUserCourseCommentService.addComment(parentId);
+            }
+        } catch (Exception e) {
+            log.error("新增课堂评论失败", e);
+        }finally {
+            redisCache.deleteObject("comment_" + courseId + "_" + getUserId());
+        }
+
+
+        return R.ok();
+    }
+
     /**
      * 修改课堂评论
      */

+ 2 - 2
fs-user-app/src/main/java/com/fs/app/controller/course/CourseQwController.java

@@ -208,7 +208,7 @@ public class CourseQwController extends AppBaseController {
             if (log.getLogType()==2){
                 isFinish=1;
             }
-            if ("北京卓美".equals(companyName)){
+            if (config != null && Boolean.TRUE.equals(config.getEnableCourseGoodsShow())){
                 getGoodsAndShow(param, course);
             }
 
@@ -246,7 +246,7 @@ public class CourseQwController extends AppBaseController {
             if (log.getLogType()==2){
                 isFinish=1;
             }
-            if ("北京卓美".equals(companyName)){
+            if (config != null && Boolean.TRUE.equals(config.getEnableCourseGoodsShow())){
                 getGoodsAndShow(param, course);
             }
             return R.ok().put("course",course).put("questions",questionVOList).put("config",config).put("playDuration",duration).put("isFinish",isFinish);

+ 1 - 1
fs-user-app/src/main/java/com/fs/app/controller/live/LiveOrderController.java

@@ -340,7 +340,7 @@ public class LiveOrderController extends AppBaseController
         String userId= getUserId();
         log.info("开始创建订单,登录用户id:{}", userId);
         param.setUserId(userId);
-        if(CloudHostUtils.hasCloudHostName("济世百康","蒙牛")){
+        if(CloudHostUtils.hasCloudHostName("济世百康")){
             return  orderService.createLiveOrder(param);
         }else{
             return orderService.createStoreOrder(param);

+ 128 - 1
fs-user-app/src/main/java/com/fs/app/controller/store/CourseCommentScrmController.java

@@ -17,16 +17,28 @@ import com.fs.course.service.IFsUserCourseCommentService;
 import com.fs.course.vo.FsUserCourseCommentListUVO;
 import com.fs.course.vo.FsUserCourseCommentReplyListUVO;
 import com.fs.sensitive.ProductionWordFilter;
+import com.fs.course.config.CourseConfig;
+import com.fs.system.service.ISysConfigService;
+import cn.hutool.json.JSONUtil;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import com.fs.common.utils.DateUtils;
+import com.fs.system.oss.CloudStorageService;
+import com.fs.system.oss.OSSFactory;
 
 import java.util.Date;
 import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
 
 /**
  * 课堂评论Controller
@@ -39,6 +51,7 @@ import java.util.List;
 @RequestMapping(value="/store/app/course/comment")
 public class CourseCommentScrmController extends AppBaseController
 {
+    private static final Logger log = LoggerFactory.getLogger(CourseCommentScrmController.class);
     @Autowired
     private IFsUserCourseCommentService fsUserCourseCommentService;
 
@@ -54,6 +67,9 @@ public class CourseCommentScrmController extends AppBaseController
     @Autowired
     private ProductionWordFilter productionWordFilter;
 
+    @Autowired
+    private ISysConfigService configService;
+
     /**
      * 查询课堂评论列表
      */
@@ -97,7 +113,10 @@ public class CourseCommentScrmController extends AppBaseController
     public R add(@RequestBody FsUserCourseCommentAddParam param)
     {
         String content = param.getContent();
-        if ("北京卓美".equals(cloudHostProper.getCompanyName())) {
+        // 判断是否开启评论内容脱敏过滤
+        String json = configService.selectConfigByKey("course.config");
+        CourseConfig courseConfig = JSONUtil.toBean(json, CourseConfig.class);
+        if (courseConfig != null && Boolean.TRUE.equals(courseConfig.getEnableCommentWordFilter())) {
             if (content == null) {
                 content = "";
             }
@@ -127,6 +146,114 @@ public class CourseCommentScrmController extends AppBaseController
         return R.ok();
     }
 
+    /**
+     * 新增课堂评论(含图片视频)
+     */
+    @Login
+    @ApiOperation("新增课堂评论(含图片视频)")
+    @Transactional
+    @PostMapping("/addCommentWithMedia")
+    public R addWithMedia(
+            @RequestParam(value = "courseId") Long courseId,
+            @RequestParam(value = "type") Long type,
+            @RequestParam(value = "parentId", required = false) Long parentId,
+            @RequestParam(value = "content", required = false) String content,
+            @RequestParam(value = "toUserId", required = false) Long toUserId,
+            @RequestParam(value = "imageFiles", required = false) MultipartFile[] imageFiles,
+            @RequestParam(value = "videoFiles", required = false) MultipartFile[] videoFiles
+    ) throws Exception {
+        boolean b = redisCache.setIfAbsent("comment_" + courseId + "_" + getUserId(), 1, 10, TimeUnit.MINUTES);
+        if (!b) {
+            return R.error("请勿重复提交");
+        }
+        try {
+            // 判断是否开启评论内容脱敏过滤
+            String json = configService.selectConfigByKey("course.config");
+            CourseConfig courseConfig = JSONUtil.toBean(json, CourseConfig.class);
+            if (courseConfig != null && Boolean.TRUE.equals(courseConfig.getEnableCommentWordFilter())) {
+                if (content == null) {
+                    content = "";
+                }
+                String filtered = productionWordFilter.filter(content).getFilteredText();
+                if (StringUtils.isEmpty(filtered) && (imageFiles == null || imageFiles.length == 0) && (videoFiles == null || videoFiles.length == 0)) {
+                    return R.error("评论内容无效,请重新输入");
+                }
+                content = filtered;
+            }
+
+            // 上传图片,URL拼接到content末尾
+            if (imageFiles != null && imageFiles.length > 0) {
+                long imageMaxSize = 50 * 1024 * 1024L; // 50MB
+                for (MultipartFile imageFile : imageFiles) {
+                    if (imageFile.isEmpty()) {
+                        continue;
+                    }
+                    if (imageFile.getSize() > imageMaxSize) {
+                        return R.error("图片大小不能超过50MB");
+                    }
+                    String fileName = imageFile.getOriginalFilename();
+                    String suffix = fileName.substring(fileName.lastIndexOf("."));
+                    String datePath = DateUtils.dateTime();
+                    String uuid = UUID.randomUUID().toString().replaceAll("-", "");
+                    String path = "comment/image/" + datePath + "/" + uuid + suffix;
+                    CloudStorageService storage = OSSFactory.build();
+                    String url = storage.upload(imageFile.getBytes(), path);
+                    content = (content == null ? "" : content) + "\n" + url;
+                }
+            }
+
+            // 上传视频,URL拼接到content末尾
+            if (videoFiles != null && videoFiles.length > 0) {
+                long videoMaxSize = 100 * 1024 * 1024L; // 100MB
+                for (MultipartFile videoFile : videoFiles) {
+                    if (videoFile.isEmpty()) {
+                        continue;
+                    }
+                    if (videoFile.getSize() > videoMaxSize) {
+                        return R.error("视频大小不能超过100MB");
+                    }
+                    String fileName = videoFile.getOriginalFilename();
+                    String suffix = fileName.substring(fileName.lastIndexOf("."));
+                    String datePath = DateUtils.dateTime();
+                    String uuid = UUID.randomUUID().toString().replaceAll("-", "");
+                    String path = "comment/video/" + datePath + "/" + uuid + suffix;
+                    CloudStorageService storage = OSSFactory.build();
+                    String url = storage.upload(videoFile.getBytes(), path);
+                    content = (content == null ? "" : content) + "\n" + url;
+                }
+            }
+
+            FsUserCourseComment fsUserCourseComment = new FsUserCourseComment();
+            fsUserCourseComment.setUserId(Long.parseLong(getUserId()));
+            fsUserCourseComment.setCourseId(courseId);
+            if (StringUtils.isNotEmpty(cloudHostProper.getCommentContentReplaceFrom())) {
+                content = content.replace(cloudHostProper.getCommentContentReplaceFrom(), cloudHostProper.getCommentContentReplaceTo());
+            }
+            fsUserCourseComment.setContent(content);
+            fsUserCourseComment.setType(type);
+            if (type == 1) {
+                fsUserCourseComment.setParentId(0L);
+            } else {
+                fsUserCourseComment.setParentId(parentId);
+            }
+            fsUserCourseComment.setToUserId(toUserId);
+            fsUserCourseComment.setCreateTime(new Date());
+
+            fsUserCourseCommentService.insertFsUserCourseComment(fsUserCourseComment);
+            if (type == 2) {
+                fsUserCourseCommentService.addComment(parentId);
+            }
+        } catch (Exception e) {
+            log.error("新增课堂评论失败", e);
+        }finally {
+            redisCache.deleteObject("comment_" + courseId + "_" + getUserId());
+        }
+
+
+
+        return R.ok();
+    }
+
     /**
      * 修改课堂评论
      */

+ 1 - 1
fs-user-app/src/main/java/com/fs/app/controller/store/PayScrmController.java

@@ -82,7 +82,7 @@ public class PayScrmController {
             switch (order[0]) {
                 case "store":
                 case "live":
-                    if (CloudHostUtils.hasCloudHostName("济世百康","蒙牛") ) {
+                    if ("live".equals(order[0]) && CloudHostUtils.hasCloudHostName("济世百康")) {
                         liveOrderService.payConfirm(1,null,order[1], o.getHf_seq_id(),o.getOut_trans_id(),o.getParty_order_id());
                         break;
                     }