Parcourir la source

1.课程管理批量新增问题处理

yfh il y a 1 semaine
Parent
commit
6dc8caa0a4

+ 3 - 0
fs-admin/src/main/java/com/fs/course/controller/FsUserCourseVideoController.java

@@ -151,6 +151,9 @@ public class FsUserCourseVideoController extends BaseController
     }
     @PostMapping("/batchSaveVideo")
     public R batchSaveVideo(@RequestBody BatchVideoSvae vo){
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        Long userId = loginUser.getUser().getUserId();
+        vo.setUserId(userId);
         fsUserCourseVideoService.batchSaveVideo(vo);
         return R.ok();
     }

+ 1 - 0
fs-service-system/src/main/java/com/fs/course/param/BatchVideoSvae.java

@@ -10,5 +10,6 @@ import java.util.List;
 @Data
 public class BatchVideoSvae {
     private Long courseId;
+    private Long userId;
     private List<Long> ids;
 }

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

@@ -1271,6 +1271,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             entity.setFileSize(e.getFileSize());
             entity.setFileKey(e.getFileKey());
             entity.setIsTranscode(0);
+            entity.setUserId(vo.getUserId());
             return entity;
         }).collect(Collectors.toList());
         fsUserCourseVideoMapper.insertBatchFsUserCourseVideo(collect);

+ 5 - 1
fs-service-system/src/main/resources/db/upgrade/20250621客户分级.sql

@@ -11,4 +11,8 @@ create table crm_customer_level (
 -- 客户表新增级别字段、置顶字段
 alter table crm_customer
     add column `customer_level` bigint comment '客户级别' after `customer_type`,
-    add column `is_top` tinyint default 0 comment '是否置顶 0未置顶 1置顶';
+    add column `is_top` tinyint default 0 comment '是否置顶 0未置顶 1置顶';
+
+ALTER TABLE company_user ADD volume DOUBLE NULL COMMENT '音量';
+
+ALTER TABLE company_user ADD is_allowed_all_register1 TINYINT DEFAULT 1 NULL COMMENT '是否允许所有方式注册会员,1-是 0否,默认1(用于个微注册会员)';

+ 4 - 2
fs-service-system/src/main/resources/mapper/course/FsUserCourseVideoMapper.xml

@@ -149,7 +149,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         red_packet_money,
         file_size,
         file_key,
-        is_transcode
+        is_transcode,
+        user_id
         )
         values
         <foreach collection="collect" item="item" separator=",">
@@ -169,7 +170,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{item.redPacketMoney},
             #{item.fileSize},
             #{item.fileKey},
-            #{item.isTranscode}
+            #{item.isTranscode},
+            #{item.userId}
             )
         </foreach>
     </insert>