Browse Source

Merge branch 'refs/heads/master' into 会员关联项目

Long 4 weeks ago
parent
commit
9f3446f6e3
45 changed files with 300 additions and 204 deletions
  1. 4 2
      fs-admin/src/main/java/com/fs/course/controller/FsCourseRedPacketLogController.java
  2. 11 2
      fs-admin/src/main/java/com/fs/course/controller/FsCourseTrafficLogController.java
  3. 2 1
      fs-admin/src/main/java/com/fs/course/controller/FsUserCourseController.java
  4. 3 0
      fs-admin/src/main/java/com/fs/course/controller/FsUserCourseVideoController.java
  5. 18 0
      fs-admin/src/main/java/com/fs/course/controller/FsUserWatchCourseStatisticsController.java
  6. 10 0
      fs-admin/src/main/java/com/fs/course/controller/FsUserWatchStatisticsController.java
  7. 4 2
      fs-admin/src/main/java/com/fs/qw/controller/QwSopController.java
  8. 0 137
      fs-company-app/src/main/resources/application-druid-fby.yml
  9. 5 5
      fs-company/src/main/java/com/fs/course/controller/FsCourseAnswerLogsController.java
  10. 2 2
      fs-company/src/main/java/com/fs/course/controller/FsCourseRedPacketLogController.java
  11. 1 1
      fs-company/src/main/java/com/fs/course/controller/FsCourseTrafficLogController.java
  12. 1 1
      fs-company/src/main/java/com/fs/course/controller/FsUserCourseController.java
  13. 20 17
      fs-company/src/main/java/com/fs/course/controller/FsUserCourseVideoController.java
  14. 18 0
      fs-company/src/main/java/com/fs/course/controller/FsUserWatchCourseStatisticsController.java
  15. 1 1
      fs-company/src/main/java/com/fs/qw/QwSopController.java
  16. 11 0
      fs-company/src/main/java/com/fs/user/FsUserAdminController.java
  17. 5 1
      fs-service-system/src/main/java/com/fs/company/service/impl/CompanyUserServiceImpl.java
  18. 10 2
      fs-service-system/src/main/java/com/fs/course/domain/FsUserWatchCourseStatistics.java
  19. 4 1
      fs-service-system/src/main/java/com/fs/course/domain/FsUserWatchStatistics.java
  20. 1 2
      fs-service-system/src/main/java/com/fs/course/mapper/FsUserCourseMapper.java
  21. 1 2
      fs-service-system/src/main/java/com/fs/course/mapper/FsUserCourseVideoMapper.java
  22. 1 0
      fs-service-system/src/main/java/com/fs/course/param/BatchVideoSvae.java
  23. 9 1
      fs-service-system/src/main/java/com/fs/course/param/FsCourseAnswerLogsParam.java
  24. 1 1
      fs-service-system/src/main/java/com/fs/course/service/IFsUserCourseService.java
  25. 15 1
      fs-service-system/src/main/java/com/fs/course/service/impl/FsCourseAnswerLogsServiceImpl.java
  26. 6 3
      fs-service-system/src/main/java/com/fs/course/service/impl/FsUserCourseServiceImpl.java
  27. 1 0
      fs-service-system/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java
  28. 3 2
      fs-service-system/src/main/java/com/fs/course/vo/FsCourseAnswerLogsListVO.java
  29. 5 1
      fs-service-system/src/main/java/com/fs/course/vo/FsUserWatchCourseStatisticsExportVO.java
  30. 5 1
      fs-service-system/src/main/java/com/fs/statis/service/impl/StatisticsCompanyServiceImpl.java
  31. 3 3
      fs-service-system/src/main/java/com/fs/store/mapper/FsStoreOrderMapper.java
  32. 3 0
      fs-service-system/src/main/java/com/fs/store/mapper/FsUserMapper.java
  33. 2 0
      fs-service-system/src/main/java/com/fs/store/param/h5/FsUserPageListParam.java
  34. 7 0
      fs-service-system/src/main/java/com/fs/store/service/IFsUserService.java
  35. 11 0
      fs-service-system/src/main/java/com/fs/store/service/impl/FsUserServiceImpl.java
  36. 2 0
      fs-service-system/src/main/resources/application-config-bly.yml
  37. 1 1
      fs-service-system/src/main/resources/application-config-fby.yml
  38. 3 0
      fs-service-system/src/main/resources/application-druid-zkzh.yml
  39. 5 1
      fs-service-system/src/main/resources/db/upgrade/20250621客户分级.sql
  40. 11 1
      fs-service-system/src/main/resources/mapper/company/CompanyUserMapper.xml
  41. 9 0
      fs-service-system/src/main/resources/mapper/course/FsCourseAnswerLogsMapper.xml
  42. 3 3
      fs-service-system/src/main/resources/mapper/course/FsCourseWatchLogMapper.xml
  43. 7 0
      fs-service-system/src/main/resources/mapper/course/FsUserCourseMapper.xml
  44. 15 3
      fs-service-system/src/main/resources/mapper/course/FsUserCourseVideoMapper.xml
  45. 40 3
      fs-service-system/src/main/resources/mapper/store/FsUserMapper.xml

+ 4 - 2
fs-admin/src/main/java/com/fs/course/controller/FsCourseRedPacketLogController.java

@@ -122,14 +122,16 @@ public class FsCourseRedPacketLogController extends BaseController
     @GetMapping("/courseList")
     public R courseList()
     {
-        List<OptionsVO> optionsVOS = fsUserCourseMapper.selectFsUserCourseAllList();
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        List<OptionsVO> optionsVOS = fsUserCourseMapper.selectFsUserCourseAllList(loginUser.getUser().getUserId());
         return R.ok().put("list", optionsVOS);
     }
 
     @GetMapping(value = "/videoList/{id}")
     public R videoList(@PathVariable("id") Long id)
     {
-        List<OptionsVO> optionsVOS = fsUserCourseVideoMapper.selectFsUserCourseVodeAllList(id);
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        List<OptionsVO> optionsVOS = fsUserCourseVideoMapper.selectFsUserCourseVodeAllList(id,loginUser.getUser().getUserId());
         return R.ok().put("list", optionsVOS);
     }
 }

+ 11 - 2
fs-admin/src/main/java/com/fs/course/controller/FsCourseTrafficLogController.java

@@ -7,7 +7,10 @@ import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ServletUtils;
 import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.core.security.LoginUser;
+import com.fs.core.web.service.TokenService;
 import com.fs.course.domain.FsCourseTrafficLog;
 import com.fs.course.mapper.FsUserCourseVideoMapper;
 import com.fs.course.param.FsCourseTrafficLogParam;
@@ -43,6 +46,8 @@ public class FsCourseTrafficLogController extends BaseController
     private IFsUserCourseService fsUserCourseMapper;
     @Autowired
     private FsUserCourseVideoMapper fsUserCourseVideoMapper;
+    @Autowired
+    private TokenService tokenService;
     /**
      * 查询短链课程流量记录列表
      */
@@ -121,14 +126,18 @@ public class FsCourseTrafficLogController extends BaseController
     @GetMapping("/courseList")
     public R courseList()
     {
-        List<OptionsVO> optionsVOS = fsUserCourseMapper.selectFsUserCourseAllList();
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        List<OptionsVO> optionsVOS = fsUserCourseMapper.selectFsUserCourseAllList(loginUser.getUser().getUserId());
         return R.ok().put("list", optionsVOS);
     }
 
     @GetMapping(value = "/videoList/{id}")
     public R videoList(@PathVariable("id") Long id)
     {
-        List<OptionsVO> optionsVOS = fsUserCourseVideoMapper.selectFsUserCourseVodeAllList(id);
+
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+
+        List<OptionsVO> optionsVOS = fsUserCourseVideoMapper.selectFsUserCourseVodeAllList(id,loginUser.getUser().getUserId());
         return R.ok().put("list", optionsVOS);
     }
 }

+ 2 - 1
fs-admin/src/main/java/com/fs/course/controller/FsUserCourseController.java

@@ -194,7 +194,8 @@ public class FsUserCourseController extends BaseController
     @GetMapping("/getAllList")
     public R getAllList()
     {
-        List<OptionsVO> list = fsUserCourseService.selectFsUserCourseAllList();
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        List<OptionsVO> list = fsUserCourseService.selectFsUserCourseAllList(loginUser.getUser().getUserId());
         return R.ok().put("data", list);
     }
 

+ 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();
     }

+ 18 - 0
fs-admin/src/main/java/com/fs/course/controller/FsUserWatchCourseStatisticsController.java

@@ -46,6 +46,12 @@ public class FsUserWatchCourseStatisticsController extends BaseController
     {
         startPage();
         List<FsUserWatchCourseStatistics> list = fsUserWatchCourseStatisticsService.selectFsUserWatchCourseStatisticsList(fsUserWatchCourseStatistics);
+        if(!list.isEmpty()){
+            for (FsUserWatchCourseStatistics userWatchCourseStatistics : list) {
+                userWatchCourseStatistics.setCompleteWatchRatePercent(userWatchCourseStatistics.getCompleteWatchRate() + "%");
+                userWatchCourseStatistics.setAnswerRightRatePercent(userWatchCourseStatistics.getAnswerRightRate() + "%");
+            }
+        }
         return getDataTable(list);
     }
 
@@ -58,6 +64,12 @@ public class FsUserWatchCourseStatisticsController extends BaseController
     public AjaxResult export(FsUserWatchCourseStatistics fsUserWatchCourseStatistics)
     {
         List<FsUserWatchCourseStatistics> list = fsUserWatchCourseStatisticsService.selectFsUserWatchCourseStatisticsList(fsUserWatchCourseStatistics);
+        if(!list.isEmpty()){
+            for (FsUserWatchCourseStatistics userWatchCourseStatistics : list) {
+                userWatchCourseStatistics.setCompleteWatchRatePercent(userWatchCourseStatistics.getCompleteWatchRate() + "%");
+                userWatchCourseStatistics.setAnswerRightRatePercent(userWatchCourseStatistics.getAnswerRightRate() + "%");
+            }
+        }
         ExcelUtil<FsUserWatchCourseStatistics> util = new ExcelUtil<FsUserWatchCourseStatistics>(FsUserWatchCourseStatistics.class);
         return util.exportExcel(list, "会员观看数据明细");
     }
@@ -114,6 +126,11 @@ public class FsUserWatchCourseStatisticsController extends BaseController
     {
         startPage();
         List<FsUserWatchCourseStatistics> list = fsUserWatchCourseStatisticsService.selectFsUserWatchCourseStatisticsListTotal(fsUserWatchCourseStatistics);
+        if(!list.isEmpty()){
+            for (FsUserWatchCourseStatistics userWatchCourseStatistics : list) {
+                userWatchCourseStatistics.setCompleteWatchRatePercent(userWatchCourseStatistics.getCompleteWatchRate() + "%");
+            }
+        }
         return getDataTable(list);
     }
 
@@ -128,6 +145,7 @@ public class FsUserWatchCourseStatisticsController extends BaseController
         List<FsUserWatchCourseStatisticsExportVO> listVO = list.stream().map(v -> {
             FsUserWatchCourseStatisticsExportVO vo = new FsUserWatchCourseStatisticsExportVO();
             BeanUtils.copyProperties(v, vo);
+            vo.setCompleteWatchRatePercent(v.getCompleteWatchRate() + "%");
             return vo;
         }).collect(Collectors.toList());
         ExcelUtil<FsUserWatchCourseStatisticsExportVO> util = new ExcelUtil<FsUserWatchCourseStatisticsExportVO>(FsUserWatchCourseStatisticsExportVO.class);

+ 10 - 0
fs-admin/src/main/java/com/fs/course/controller/FsUserWatchStatisticsController.java

@@ -44,6 +44,11 @@ public class FsUserWatchStatisticsController extends BaseController
     {
         startPage();
         List<FsUserWatchStatistics> list = fsUserWatchStatisticsService.selectFsUserWatchStatisticsList(fsUserWatchStatistics);
+        if(!list.isEmpty()){
+            for (FsUserWatchStatistics userWatchStatistics : list) {
+                userWatchStatistics.setCompleteWatchRatePercent(userWatchStatistics.getCompleteWatchRate() + "%");
+            }
+        }
         return getDataTable(list);
     }
 
@@ -56,6 +61,11 @@ public class FsUserWatchStatisticsController extends BaseController
     public AjaxResult export(FsUserWatchStatistics fsUserWatchStatistics)
     {
         List<FsUserWatchStatistics> list = fsUserWatchStatisticsService.selectFsUserWatchStatisticsList(fsUserWatchStatistics);
+        if(!list.isEmpty()){
+            for (FsUserWatchStatistics userWatchStatistics : list) {
+                userWatchStatistics.setCompleteWatchRatePercent(userWatchStatistics.getCompleteWatchRate() + "%");
+            }
+        }
         ExcelUtil<FsUserWatchStatistics> util = new ExcelUtil<FsUserWatchStatistics>(FsUserWatchStatistics.class);
         return util.exportExcel(list, "会员看课统计-按营期统计数据");
     }

+ 4 - 2
fs-admin/src/main/java/com/fs/qw/controller/QwSopController.java

@@ -77,14 +77,16 @@ public class QwSopController extends BaseController
     @GetMapping("/courseList")
     public R courseList()
     {
-        List<OptionsVO> optionsVOS = fsUserCourseMapper.selectFsUserCourseAllList();
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        List<OptionsVO> optionsVOS = fsUserCourseMapper.selectFsUserCourseAllList(loginUser.getUser().getUserId());
         return R.ok().put("list", optionsVOS);
     }
 
     @GetMapping(value = "/videoList/{id}")
     public R videoList(@PathVariable("id") Long id)
     {
-        List<OptionsVO> optionsVOS = fsUserCourseVideoMapper.selectFsUserCourseVodeAllList(id);
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        List<OptionsVO> optionsVOS = fsUserCourseVideoMapper.selectFsUserCourseVodeAllList(id,loginUser.getUser().getUserId());
         return R.ok().put("list", optionsVOS);
     }
     /**

+ 0 - 137
fs-company-app/src/main/resources/application-druid-fby.yml

@@ -1,137 +0,0 @@
-# 数据源配置
-spring:
-    # redis 配置
-    redis:
-        # 地址
-        host: 192.168.0.4
-        # 端口,默认为6379
-        port: 6379
-        # 密码
-        password: Ylrztek250218!3@.
-        # 连接超时时间
-        timeout: 30s
-        lettuce:
-            pool:
-                # 连接池中的最小空闲连接
-                min-idle: 0
-                # 连接池中的最大空闲连接
-                max-idle: 8
-                # 连接池的最大数据库连接数
-                max-active: 8
-                # #连接池最大阻塞等待时间(使用负值表示没有限制)
-                max-wait: -1ms
-        database: 0
-    datasource:
-        mysql:
-            type: com.alibaba.druid.pool.DruidDataSource
-            driverClassName: com.mysql.cj.jdbc.Driver
-            druid:
-                # 主库数据源
-                master:
-                    url: jdbc:mysql://192.168.0.74:3306/fby_store?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: root
-                    password: Ylrztek250218!3@.
-                # 从库数据源
-                slave:
-                    # 从数据源开关/默认关闭
-                    enabled: false
-                    url:
-                    username:
-                    password:
-                # 初始连接数
-                initialSize: 5
-                # 最小连接池数量
-                minIdle: 10
-                # 最大连接池数量
-                maxActive: 20
-                # 配置获取连接等待超时的时间
-                maxWait: 60000
-                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-                timeBetweenEvictionRunsMillis: 60000
-                # 配置一个连接在池中最小生存的时间,单位是毫秒
-                minEvictableIdleTimeMillis: 300000
-                # 配置一个连接在池中最大生存的时间,单位是毫秒
-                maxEvictableIdleTimeMillis: 900000
-                # 配置检测连接是否有效
-                validationQuery: SELECT 1 FROM DUAL
-                testWhileIdle: true
-                testOnBorrow: false
-                testOnReturn: false
-                webStatFilter:
-                    enabled: true
-                statViewServlet:
-                    enabled: true
-                    # 设置白名单,不填则允许所有访问
-                    allow:
-                    url-pattern: /druid/*
-                    # 控制台管理用户名和密码
-                    login-username: fs
-                    login-password: 123456
-                filter:
-                    stat:
-                        enabled: true
-                        # 慢SQL记录
-                        log-slow-sql: true
-                        slow-sql-millis: 1000
-                        merge-sql: true
-                    wall:
-                        config:
-                            multi-statement-allow: true
-        sop:
-            type: com.alibaba.druid.pool.DruidDataSource
-            driverClassName: com.mysql.cj.jdbc.Driver
-            druid:
-                # 主库数据源
-                master:
-                    url: jdbc:mysql://192.168.0.74:3306/sop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                    username: root
-                    password: Ylrztek250218!3@.
-                # 初始连接数
-                initialSize: 5
-                # 最小连接池数量
-                minIdle: 10
-                # 最大连接池数量
-                maxActive: 20
-                # 配置获取连接等待超时的时间
-                maxWait: 60000
-                # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-                timeBetweenEvictionRunsMillis: 60000
-                # 配置一个连接在池中最小生存的时间,单位是毫秒
-                minEvictableIdleTimeMillis: 300000
-                # 配置一个连接在池中最大生存的时间,单位是毫秒
-                maxEvictableIdleTimeMillis: 900000
-                # 配置检测连接是否有效
-                validationQuery: SELECT 1 FROM DUAL
-                testWhileIdle: true
-                testOnBorrow: false
-                testOnReturn: false
-                webStatFilter:
-                    enabled: true
-                statViewServlet:
-                    enabled: true
-                    # 设置白名单,不填则允许所有访问
-                    allow:
-                    url-pattern: /druid/*
-                    # 控制台管理用户名和密码
-                    login-username: fs
-                    login-password: 123456
-                filter:
-                    stat:
-                        enabled: true
-                        # 慢SQL记录
-                        log-slow-sql: true
-                        slow-sql-millis: 1000
-                        merge-sql: true
-                    wall:
-                        config:
-                            multi-statement-allow: true
-rocketmq:
-    name-server: rmq-1243b25nj.rocketmq.gz.public.tencenttdmq.com:8080 # RocketMQ NameServer 地址
-    producer:
-        group: my-producer-group
-        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
-        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
-    consumer:
-        group: test-group
-        access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
-        secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey

+ 5 - 5
fs-company/src/main/java/com/fs/course/controller/FsCourseAnswerLogsController.java

@@ -105,26 +105,26 @@ public class FsCourseAnswerLogsController extends BaseController
         }
         List<FsCourseAnswerLogsListVO> list = fsCourseAnswerLogsService.selectFsCourseAnswerLogsListVONew(param);
         ExcelUtil<FsCourseAnswerLogsListVO> util = new ExcelUtil<FsCourseAnswerLogsListVO>(FsCourseAnswerLogsListVO.class);
-        return util.exportExcel(list, "答题日志数据");
+        return util.exportExcel(list, "答题记录数据");
     }
 
     /**
-     * 导出答题日志列表
+     * 导出我的答题日志列表
      */
     @PreAuthorize("@ss.hasPermi('course:courseAnswerLog:myExport')")
-    @Log(title = "答题日志", businessType = BusinessType.EXPORT)
+    @Log(title = "我的答题日志", businessType = BusinessType.EXPORT)
     @GetMapping("/myExport")
     public AjaxResult myExport(FsCourseAnswerLogsParam param)
     {
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         param.setCompanyId( loginUser.getCompany().getCompanyId());
-
+        param.setCompanyUserId(loginUser.getUser().getUserId());
         if (param.getPhoneMk() != null && param.getPhoneMk() != "") {
             param.setPhone(param.getPhoneMk());
         }
         List<FsCourseAnswerLogsListVO> list = fsCourseAnswerLogsService.selectFsCourseAnswerLogsListVONew(param);
         ExcelUtil<FsCourseAnswerLogsListVO> util = new ExcelUtil<FsCourseAnswerLogsListVO>(FsCourseAnswerLogsListVO.class);
-        return util.exportExcel(list, "答题日志数据");
+        return util.exportExcel(list, "我的答题记录数据");
     }
 
 //    /**

+ 2 - 2
fs-company/src/main/java/com/fs/course/controller/FsCourseRedPacketLogController.java

@@ -169,14 +169,14 @@ public class FsCourseRedPacketLogController extends BaseController
     @GetMapping("/courseList")
     public R courseList()
     {
-        List<OptionsVO> optionsVOS = fsUserCourseMapper.selectFsUserCourseAllList();
+        List<OptionsVO> optionsVOS = fsUserCourseMapper.selectFsUserCourseAllList(null);
         return R.ok().put("list", optionsVOS);
     }
 
     @GetMapping(value = "/videoList/{id}")
     public R videoList(@PathVariable("id") Long id)
     {
-        List<OptionsVO> optionsVOS = fsUserCourseVideoMapper.selectFsUserCourseVodeAllList(id);
+        List<OptionsVO> optionsVOS = fsUserCourseVideoMapper.selectFsUserCourseVodeAllList(id,null);
         return R.ok().put("list", optionsVOS);
     }
 }

+ 1 - 1
fs-company/src/main/java/com/fs/course/controller/FsCourseTrafficLogController.java

@@ -128,7 +128,7 @@ public class FsCourseTrafficLogController extends BaseController
     @GetMapping("/courseList")
     public R courseList()
     {
-        List<OptionsVO> optionsVOS = fsUserCourseMapper.selectFsUserCourseAllList();
+        List<OptionsVO> optionsVOS = fsUserCourseMapper.selectFsUserCourseAllList(null);
         return R.ok().put("list", optionsVOS);
     }
 }

+ 1 - 1
fs-company/src/main/java/com/fs/course/controller/FsUserCourseController.java

@@ -78,7 +78,7 @@ public class FsUserCourseController extends BaseController
     @GetMapping("/getAllList")
     public R getAllList()
     {
-        List<OptionsVO> list = fsUserCourseService.selectFsUserCourseAllList();
+        List<OptionsVO> list = fsUserCourseService.selectFsUserCourseAllList(null);
         return R.ok().put("data", list);
     }
 

+ 20 - 17
fs-company/src/main/java/com/fs/course/controller/FsUserCourseVideoController.java

@@ -70,25 +70,28 @@ public class FsUserCourseVideoController extends BaseController
     @GetMapping(value = "/{videoId}")
     public AjaxResult getInfo(@PathVariable("videoId") Long videoId)
     {
-        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
-
-        return AjaxResult.success(fsUserCourseVideoService.selectFsUserCourseVideoByVideoIdVO(videoId,loginUser.getUser().getUserId()));
+        return AjaxResult.success(fsUserCourseVideoService.selectFsUserCourseVideoByVideoIdVO(videoId,null));
     }
 
-    /**
-     * 新增课堂视频
-     */
-    @PreAuthorize("@ss.hasPermi('course:userCourseVideo:add')")
-    @Log(title = "课堂视频", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody FsUserCourseVideo fsUserCourseVideo)
-    {
-        Long count = fsUserCourseVideoMapper.selectFsUserCourseVideoByCourseSort(fsUserCourseVideo.getCourseId(),fsUserCourseVideo.getCourseSort());
-        if (count>0){
-            return AjaxResult.error("课程排序重复");
-        }
-        return toAjax(fsUserCourseVideoService.insertFsUserCourseVideo(fsUserCourseVideo));
-    }
+
+
+
+
+
+//    /**
+//     * 新增课堂视频 如果需要开放此功能需要考虑user_id,admin有加这个参数
+//     */
+//    @PreAuthorize("@ss.hasPermi('course:userCourseVideo:add')")
+//    @Log(title = "课堂视频", businessType = BusinessType.INSERT)
+//    @PostMapping
+//    public AjaxResult add(@RequestBody FsUserCourseVideo fsUserCourseVideo)
+//    {
+//        Long count = fsUserCourseVideoMapper.selectFsUserCourseVideoByCourseSort(fsUserCourseVideo.getCourseId(),fsUserCourseVideo.getCourseSort());
+//        if (count>0){
+//            return AjaxResult.error("课程排序重复");
+//        }
+//        return toAjax(fsUserCourseVideoService.insertFsUserCourseVideo(fsUserCourseVideo));
+//    }
 
     /**
      * 修改课堂视频

+ 18 - 0
fs-company/src/main/java/com/fs/course/controller/FsUserWatchCourseStatisticsController.java

@@ -46,6 +46,12 @@ public class FsUserWatchCourseStatisticsController extends BaseController
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         fsUserWatchCourseStatistics.setCompanyId( loginUser.getCompany().getCompanyId());
         List<FsUserWatchCourseStatistics> list = fsUserWatchCourseStatisticsService.selectFsUserWatchCourseStatisticsList(fsUserWatchCourseStatistics);
+        if(!list.isEmpty()){
+            for (FsUserWatchCourseStatistics userWatchCourseStatistics : list) {
+                userWatchCourseStatistics.setCompleteWatchRatePercent(userWatchCourseStatistics.getCompleteWatchRate() + "%");
+                userWatchCourseStatistics.setAnswerRightRatePercent(userWatchCourseStatistics.getAnswerRightRate() + "%");
+            }
+        }
         return getDataTable(list);
     }
 
@@ -57,6 +63,12 @@ public class FsUserWatchCourseStatisticsController extends BaseController
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         fsUserWatchCourseStatistics.setCompanyId( loginUser.getCompany().getCompanyId());
         List<FsUserWatchCourseStatistics> list = fsUserWatchCourseStatisticsService.selectFsUserWatchCourseStatisticsList(fsUserWatchCourseStatistics);
+        if(!list.isEmpty()){
+            for (FsUserWatchCourseStatistics userWatchCourseStatistics : list) {
+                userWatchCourseStatistics.setCompleteWatchRatePercent(userWatchCourseStatistics.getCompleteWatchRate() + "%");
+                userWatchCourseStatistics.setAnswerRightRatePercent(userWatchCourseStatistics.getAnswerRightRate() + "%");
+            }
+        }
         ExcelUtil<FsUserWatchCourseStatistics> util = new ExcelUtil<FsUserWatchCourseStatistics>(FsUserWatchCourseStatistics.class);
         return util.exportExcel(list, "会员观看数据明细");
     }
@@ -72,6 +84,11 @@ public class FsUserWatchCourseStatisticsController extends BaseController
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         fsUserWatchCourseStatistics.setCompanyId( loginUser.getCompany().getCompanyId());
         List<FsUserWatchCourseStatistics> list = fsUserWatchCourseStatisticsService.selectFsUserWatchCourseStatisticsListTotal(fsUserWatchCourseStatistics);
+        if(!list.isEmpty()){
+            for (FsUserWatchCourseStatistics userWatchCourseStatistics : list) {
+                userWatchCourseStatistics.setCompleteWatchRatePercent(userWatchCourseStatistics.getCompleteWatchRate() + "%");
+            }
+        }
         return getDataTable(list);
     }
 
@@ -88,6 +105,7 @@ public class FsUserWatchCourseStatisticsController extends BaseController
         List<FsUserWatchCourseStatisticsExportVO> listVO = list.stream().map(v -> {
             FsUserWatchCourseStatisticsExportVO vo = new FsUserWatchCourseStatisticsExportVO();
             BeanUtils.copyProperties(v, vo);
+            vo.setCompleteWatchRatePercent(v.getCompleteWatchRate() + "%");
             return vo;
         }).collect(Collectors.toList());
         ExcelUtil<FsUserWatchCourseStatisticsExportVO> util = new ExcelUtil<FsUserWatchCourseStatisticsExportVO>(FsUserWatchCourseStatisticsExportVO.class);

+ 1 - 1
fs-company/src/main/java/com/fs/qw/QwSopController.java

@@ -96,7 +96,7 @@ public class QwSopController extends BaseController
     @GetMapping(value = "/videoList/{id}")
     public R videoList(@PathVariable("id") Long id)
     {
-        List<OptionsVO> optionsVOS = fsUserCourseVideoMapper.selectFsUserCourseVodeAllList(id);
+        List<OptionsVO> optionsVOS = fsUserCourseVideoMapper.selectFsUserCourseVodeAllList(id,null);
         return R.ok().put("list", optionsVOS);
     }
     /**

+ 11 - 0
fs-company/src/main/java/com/fs/user/FsUserAdminController.java

@@ -45,9 +45,20 @@ public class FsUserAdminController extends BaseController {
     public TableDataInfo pageList(@RequestBody FsUserPageListParam param) {
 //        startPage();
 
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        param.setCompanyId(loginUser.getCompany().getCompanyId());
+        return fsUserService.selectFsUserPageListNew(param);
+    }
+
+    @PreAuthorize("@ss.hasPermi('user:fsUser:myList')")
+    @PostMapping("/myList")
+    @ApiOperation("我的会员列表(与移动端使用的相同查询)")
+    public TableDataInfo pageMyList(@RequestBody FsUserPageListParam param) {
+
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         param.setCompanyId(loginUser.getCompany().getCompanyId());
         param.setCompanyUserId(String.valueOf(loginUser.getUser().getUserId()));
+        param.setIsAdmin(loginUser.getUser().isAdmin());
 
         if(param.getCompanyUserId() == null) {
             throw new IllegalArgumentException("当前销售不存在!");

+ 5 - 1
fs-service-system/src/main/java/com/fs/company/service/impl/CompanyUserServiceImpl.java

@@ -494,13 +494,17 @@ public class CompanyUserServiceImpl implements ICompanyUserService
     }
 
     @Override
+    @Transactional
     public int changeCompanyUser(List<Long> userIds, Long companyUserId, Long companyId) {
 
         CompanyUser toUser = companyUserMapper.selectCompanyUserById(companyUserId);
         if (Objects.isNull(toUser)) {
             throw new ServiceException("需要更换归属的销售不存在");
         }
-       return fsUserMapper.batchUpdateUserCompanyUser(userIds, companyUserId, companyId);
+       fsUserMapper.batchUpdateUserCompanyUser(userIds, companyUserId, companyId);
+        // 修改中间表
+        fsUserMapper.batchUpdateCompanyUserRelation(userIds, companyUserId, companyId);
+        return 1;
     }
 
     /**

+ 10 - 2
fs-service-system/src/main/java/com/fs/course/domain/FsUserWatchCourseStatistics.java

@@ -89,9 +89,13 @@ public class FsUserWatchCourseStatistics extends BaseEntity{
     private Integer completeWatchNum;
 
     /** 完播率 */
-    @Excel(name = "完播率")
+//    @Excel(name = "完播率")
     private BigDecimal completeWatchRate;
 
+    /** 完播率+% */
+    @Excel(name = "完播率")
+    private String completeWatchRatePercent;
+
     /** 答题人数 */
     @Excel(name = "答题人数")
     private Integer answerNum;
@@ -101,9 +105,13 @@ public class FsUserWatchCourseStatistics extends BaseEntity{
     private Integer answerRightNum;
 
     /** 答题正确率 */
-    @Excel(name = "正确率")
+//    @Excel(name = "正确率")
     private BigDecimal answerRightRate;
 
+    /** 答题正确率+% */
+    @Excel(name = "正确率")
+    private String answerRightRatePercent;
+
     /** 红包领取数量 */
     @Excel(name = "红包领取个数")
     private Integer redPacketNum;

+ 4 - 1
fs-service-system/src/main/java/com/fs/course/domain/FsUserWatchStatistics.java

@@ -61,8 +61,11 @@ public class FsUserWatchStatistics extends BaseEntity{
     private Integer completeWatchNum;
 
     /** 完播率 */
-    @Excel(name = "完播率")
+//    @Excel(name = "完播率")
     private BigDecimal completeWatchRate;
 
+    /** 完播率+% */
+    @Excel(name = "完播率")
+    private String completeWatchRatePercent;
 
 }

+ 1 - 2
fs-service-system/src/main/java/com/fs/course/mapper/FsUserCourseMapper.java

@@ -128,8 +128,7 @@ public interface FsUserCourseMapper
             "</script>"})
     List<FsUserCourseListUVO> selectFsUserCourseListUVO(@Param("maps") FsUserCourseListUParam param);
 
-    @Select("select course_id dict_value, course_name dict_label,img_url dict_imgUrl  from fs_user_course where is_del = 0 and is_private = 1 ")
-    List<OptionsVO> selectFsUserCourseAllList();
+    List<OptionsVO> selectFsUserCourseAllList(@Param("userId") Long userId);
 
 
     @Select({"<script> " +

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

@@ -136,8 +136,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 ")
-    List<OptionsVO> selectFsUserCourseVodeAllList(Long id);
+    List<OptionsVO> selectFsUserCourseVodeAllList(@Param("id") Long id,@Param("userId")Long userId);
 
     @Select({"<script> " +
             "select v.*,p.red_packet_money company_red_packet_money from fs_user_course_video v LEFT JOIN fs_user_course_video_red_package p on p.video_id= v.video_id and p.company_id =#{maps.companyId} " +

+ 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;
 }

+ 9 - 1
fs-service-system/src/main/java/com/fs/course/param/FsCourseAnswerLogsParam.java

@@ -5,7 +5,7 @@ import com.fs.common.core.domain.BaseEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import java.util.Date;
+import java.util.Set;
 
 @EqualsAndHashCode(callSuper = true)
 @Data
@@ -60,4 +60,12 @@ public class FsCourseAnswerLogsParam  extends BaseEntity  {
 
     private Long pageNum;
     private Long pageSize;
+    /**
+     * 用户(昵称_id组合)
+     */
+    private String userName;
+    /**
+     * 用户id
+     */
+    private Set<Long> userIds;
 }

+ 1 - 1
fs-service-system/src/main/java/com/fs/course/service/IFsUserCourseService.java

@@ -83,7 +83,7 @@ public interface IFsUserCourseService
 
     List<FsUserCourseListUVO> selectFsUserCourseListUVO(FsUserCourseListUParam param);
 
-    List<OptionsVO> selectFsUserCourseAllList();
+    List<OptionsVO> selectFsUserCourseAllList(Long userId);
 
     List<FsUserCourseListPVO> selectFsUserCourseListPVO(FsUserCourse param);
 

+ 15 - 1
fs-service-system/src/main/java/com/fs/course/service/impl/FsCourseAnswerLogsServiceImpl.java

@@ -23,11 +23,12 @@ import com.fs.store.service.cache.IFsUserCacheService;
 import com.fs.store.service.cache.IFsUserCourseCacheService;
 import com.hc.openapi.tool.util.StringUtils;
 import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.Collections;
 import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
 
 /**
  * 答题日志Service业务层处理
@@ -50,6 +51,9 @@ public class FsCourseAnswerLogsServiceImpl implements IFsCourseAnswerLogsService
     private final ICompanyCacheService companyCacheService;
 
     private final ICompanyUserCacheService companyUserCacheService;
+
+    private final IFsUserService fsUserService;
+
     /**
      * 查询答题日志
      *
@@ -86,6 +90,16 @@ public class FsCourseAnswerLogsServiceImpl implements IFsCourseAnswerLogsService
 
     @Override
     public List<FsCourseAnswerLogsListVO> selectFsCourseAnswerLogsListVONew(FsCourseAnswerLogsParam param) {
+
+        if(StringUtils.isNotEmpty(param.getUserName())){
+            List<FsUser> fsUsers = fsUserService.selectFsUserListByJointUserNameKey(param.getUserName());
+            if(fsUsers.isEmpty()) {
+                return Collections.emptyList();
+            }
+            Set<Long> userIds = fsUsers.stream().map(FsUser::getUserId).collect(Collectors.toSet());
+            param.setUserIds(userIds);
+        }
+
         List<FsCourseAnswerLogsListVO> data = fsCourseAnswerLogsMapper.selectFsCourseAnswerLogsListVONew(param);
         for (FsCourseAnswerLogsListVO datum : data) {
             FsUserCourseVideo fsUserCourseVideo = fsUserCourseVideoCacheService.selectFsUserCourseVideoByVideoId(datum.getVideoId());

+ 6 - 3
fs-service-system/src/main/java/com/fs/course/service/impl/FsUserCourseServiceImpl.java

@@ -12,6 +12,7 @@ import com.fs.company.domain.CompanyTag;
 import com.fs.company.domain.CompanyUser;
 import com.fs.company.mapper.CompanyTagMapper;
 import com.fs.company.mapper.CompanyUserMapper;
+import com.fs.config.cloud.CloudHostProper;
 import com.fs.course.config.CourseConfig;
 import com.fs.course.domain.*;
 import com.fs.course.mapper.*;
@@ -78,6 +79,8 @@ public class FsUserCourseServiceImpl implements IFsUserCourseService
     private FsCourseWatchLogMapper fsCourseWatchLogMapper;
     @Autowired
     private FsCourseAnswerLogsMapper fsCourseAnswerLogsMapper;
+    @Autowired
+    CloudHostProper cloudHostProper;
 
     private static final String realLink = "/courseH5/pages/course/learning?course=";
     private static final String shortLink = "/courseH5/pages/course/learning?s=";
@@ -220,8 +223,8 @@ public class FsUserCourseServiceImpl implements IFsUserCourseService
     }
 
     @Override
-    public List<OptionsVO> selectFsUserCourseAllList() {
-        return fsUserCourseMapper.selectFsUserCourseAllList();
+    public List<OptionsVO> selectFsUserCourseAllList(Long userId) {
+        return fsUserCourseMapper.selectFsUserCourseAllList(userId);
     }
 
 
@@ -491,7 +494,7 @@ public class FsUserCourseServiceImpl implements IFsUserCourseService
         graphics.fillRect(0, scaledHeight, scaledWidth, bottomHeight);
 
         // 绘制推荐区域(图片和文字)
-        drawRecommendationArea(graphics, file, scaledHeight, "云联融智", "为您推荐");
+        drawRecommendationArea(graphics, file, scaledHeight, cloudHostProper.getCompanyName(), "为您推荐");
 
         // 绘制二维码
         drawQRCode(graphics, url, scaledWidth, totalHeight);

+ 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);

+ 3 - 2
fs-service-system/src/main/java/com/fs/course/vo/FsCourseAnswerLogsListVO.java

@@ -18,7 +18,7 @@ public class FsCourseAnswerLogsListVO {
     /**
     * 小程序用户名
     */
-    @Excel(name = "用户")
+    @Excel(name = "用户", sort = 1)
     private String userName;
     private String fsAvatar;
     /**
@@ -37,7 +37,7 @@ public class FsCourseAnswerLogsListVO {
     /**
     * 视频名称
     */
-    @Excel(name = "视频名称",width = 70)
+    @Excel(name = "小节名称",width = 70)
     private String videoName;
     /**
     * 是否全部正确 0否 1是
@@ -86,6 +86,7 @@ public class FsCourseAnswerLogsListVO {
     /**
      * 项目名称
      */
+    @Excel(name = "项目", sort = 2)
     private String projectName;
 
     private Date sTime;

+ 5 - 1
fs-service-system/src/main/java/com/fs/course/vo/FsUserWatchCourseStatisticsExportVO.java

@@ -83,9 +83,13 @@ public class FsUserWatchCourseStatisticsExportVO extends BaseEntity{
     private Integer completeWatchNum;
 
     /** 完播率 */
-    @Excel(name = "完播率")
+//    @Excel(name = "完播率")
     private BigDecimal completeWatchRate;
 
+    /** 完播率+% */
+    @Excel(name = "完播率")
+    private String completeWatchRatePercent;
+
     /** 红包领取数量 */
     @Excel(name = "红包领取个数")
     private Integer redPacketNum;

+ 5 - 1
fs-service-system/src/main/java/com/fs/statis/service/impl/StatisticsCompanyServiceImpl.java

@@ -949,7 +949,11 @@ public class StatisticsCompanyServiceImpl implements IStatisticsCompanyService {
 
     @Override
     public List<WatchEndPlayTrendDTO> watchEndPlayTrend(AnalysisPreviewQueryDTO param) {
-        return Collections.emptyList();
+        List<WatchEndPlayTrendDTO> watchEndPlayTrendDTOS = consumptionBalanceMapper.watchEndPlayTrend(param);
+        for (WatchEndPlayTrendDTO watchEndPlayTrendDTO : watchEndPlayTrendDTOS) {
+            watchEndPlayTrendDTO.setX(watchEndPlayTrendDTO.getStartDate());
+        }
+        return watchEndPlayTrendDTOS;
     }
 
     @Override

+ 3 - 3
fs-service-system/src/main/java/com/fs/store/mapper/FsStoreOrderMapper.java

@@ -161,9 +161,9 @@ public interface FsStoreOrderMapper
             " AND date_format(o.delivery_send_time,'%y%m%d') &gt;= date_format(#{maps.deliverySendTimeList[0]},'%y%m%d') " +
             " AND date_format(o.delivery_send_time,'%y%m%d') &lt;= date_format(#{maps.deliverySendTimeList[1]},'%y%m%d') " +
             "</if>" +
-            "<if test = 'maps.paid != null    '> " +
-            "and o.paid =#{maps.paid} " +
-            "</if>" +
+//            "<if test = 'maps.paid != null    '> " +
+//            "and o.paid =#{maps.paid} " +
+//            "</if>" +
             "<if test = 'maps.payTimeList != null    '> " +
             " AND date_format(o.pay_time,'%y%m%d') &gt;= date_format(#{maps.payTimeList[0]},'%y%m%d') " +
             " AND date_format(o.pay_time,'%y%m%d') &lt;= date_format(#{maps.payTimeList[1]},'%y%m%d') " +

+ 3 - 0
fs-service-system/src/main/java/com/fs/store/mapper/FsUserMapper.java

@@ -287,6 +287,8 @@ public interface FsUserMapper
 
     int batchUpdateUserCompanyUser(@Param("userIds") List<Long> userIds, @Param("companyUserId") Long companyUserId, @Param("companyId") Long companyId);
 
+    int batchUpdateCompanyUserRelation(@Param("userIds") List<Long> userIds, @Param("companyUserId") Long companyUserId, @Param("companyId") Long companyId);
+
     /**
      * 查询会员选项列表
      * @param params    参数
@@ -315,4 +317,5 @@ public interface FsUserMapper
 
     List<FsUserWatchCourseStatistics> selectFsUserDetail();
 
+    List<FsUser> selectFsUserListByJointUserNameKey(String userNameKey);
 }

+ 2 - 0
fs-service-system/src/main/java/com/fs/store/param/h5/FsUserPageListParam.java

@@ -72,6 +72,8 @@ public class FsUserPageListParam implements Serializable {
      */
     private Long pcLoginUserId;
 
+    private Boolean isAdmin;
+
 
 
 

+ 7 - 0
fs-service-system/src/main/java/com/fs/store/service/IFsUserService.java

@@ -253,4 +253,11 @@ public interface IFsUserService
      */
     void setRepeatFansTag(FsUserCourseBeMemberParam param);
 
+    /**
+     * 根据组合key(用户昵称+id)查询用户信息
+     * @param userNameKey (用户昵称+id)
+     * @return
+     */
+    List<FsUser> selectFsUserListByJointUserNameKey(String userNameKey);
+
 }

+ 11 - 0
fs-service-system/src/main/java/com/fs/store/service/impl/FsUserServiceImpl.java

@@ -523,6 +523,12 @@ public class FsUserServiceImpl implements IFsUserService
         if(companyUserId != null) {
             Long companyUser = Long.parseLong(companyUserId);
             Set<Long> userIds = companyUserCacheService.selectUserAllCompanyUserId(companyUser);
+            if (userIds != null || userIds.size() <= 1) {
+                if (param.getIsAdmin()) {
+                    List<CompanyUser> companyUsers = companyUserMapper.selectCompanyUserByCompanyId(param.getCompanyId());
+                    userIds = companyUsers.stream().map(CompanyUser::getUserId).collect(Collectors.toSet());
+                }
+            }
             param.setCompanyUserIds(userIds);
         }
 
@@ -992,6 +998,11 @@ public class FsUserServiceImpl implements IFsUserService
         }
     }
 
+    @Override
+    public List<FsUser> selectFsUserListByJointUserNameKey(String userNameKey) {
+        return fsUserMapper.selectFsUserListByJointUserNameKey(userNameKey);
+    }
+
     // 添加关系表数据
     private FsUserCompanyUser getFsUserCompanyUser(FsUserCourseBeMemberParam param) {
         FsUserCompanyUser fsUserCompanyUser = new FsUserCompanyUser();

+ 2 - 0
fs-service-system/src/main/resources/application-config-bly.yml

@@ -105,6 +105,8 @@ tencent_cloud_config:
   proxy: beliyo
 cloud_host:
   company_name: 倍力优
+headerImg:
+  imgUrl: https://beiliyo-2025.obs.cn-north-4.myhuaweicloud.com/fs/20250115/1736944490230.png
 
 
 

+ 1 - 1
fs-service-system/src/main/resources/application-config-fby.yml

@@ -103,7 +103,7 @@ wx:
       timeout: 2000
     configs:
       - appId: wx961fadab9bcb792b # 第一个公众号的appid  //公众号名称:云联
-        secret: eddde2a1d4ca0c6c443a67e542b6864c
+        secret: 8adb2a7533921449ef6e60814c2ff075
         token: PPKOdAlCoMO # 接口配置里的Token值
         aesKey: Eswa6VjwtVMCcw03qZy6fWllgrv5aytIA1SZPEU0kU2 # 接口配置里的EncodingAESKey值
 jpush:

+ 3 - 0
fs-service-system/src/main/resources/application-druid-zkzh.yml

@@ -137,3 +137,6 @@ rocketmq:
         group: test-group
         access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
         secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
+cloud_host:
+    company_name: 中康智慧
+

+ 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(用于个微注册会员)';

+ 11 - 1
fs-service-system/src/main/resources/mapper/company/CompanyUserMapper.xml

@@ -473,7 +473,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     <select id="selectUserAllCompanyUserId" resultType="java.lang.Long">
-        select distinct user_id from company_user where parent_id=${companyUserId}
+--         select distinct user_id from company_user where parent_id=${companyUserId}
+            WITH RECURSIVE RecursiveUsers AS (
+                SELECT user_id, parent_id
+                FROM company_user
+                WHERE parent_id = ${companyUserId}
+                UNION ALL
+                SELECT cu.user_id, cu.parent_id
+                FROM company_user cu
+                         JOIN RecursiveUsers ru ON cu.parent_id = ru.user_id
+            )
+            SELECT DISTINCT user_id FROM RecursiveUsers;
     </select>
     <select id="selectCompanyUserNameUserById" resultType="java.lang.String">
         select concat(nick_name,'_',user_name) from company_user where user_id=${userId} limit 1

+ 9 - 0
fs-service-system/src/main/resources/mapper/course/FsCourseAnswerLogsMapper.xml

@@ -55,6 +55,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="courseId != null">
                 cal_inner.course_id = #{courseId}
             </if>
+            <if test="videoId != null and videoId != '' ">
+                AND cal_inner.video_id = #{videoId}
+            </if>
             <if test="companyUserId != null">
                 AND cal_inner.company_user_id = #{companyUserId}
             </if>
@@ -70,6 +73,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="sTime != null and eTime != null">
                 AND cal_inner.create_time BETWEEN #{sTime} AND #{eTime}
             </if>
+            <if test="userIds != null and userIds.size() > 0">
+                and cal_inner.user_id in
+            <foreach collection="userIds"  open="(" close=")" separator="," item="userId" index="index">
+                #{userId}
+            </foreach>
+            </if>
         </where>
         ORDER BY cal_inner.log_id DESC
         LIMIT ${(pageNum-1)*pageSize}, ${pageSize}

+ 3 - 3
fs-service-system/src/main/resources/mapper/course/FsCourseWatchLogMapper.xml

@@ -541,10 +541,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                and o.company_id=#{companyId}
             </if>
             <if test= 'sTime != null '>
-                and o.create_time &gt;= #{startDate}
+                and o.create_time &gt;= #{sTime}
             </if>
             <if test='eTime != null '>
-                and o.create_time &lt;= #{endDate}
+                and o.create_time &lt;= #{eTime}
             </if>
             <if test ='courseId !=null'>
                 and o.course_id = #{courseId}
@@ -566,7 +566,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         GROUP BY o.video_id,o.user_id,DATE(o.create_time),o.project,o.course_id
         ORDER BY o.video_id ,DATE(o.create_time)
 
-        limit ${(maps.pageNum-1)*maps.pageSize},${maps.pageSize}
+        limit ${(pageNum-1)*pageSize},${pageSize}
     </select>
     <select id="selectFsCourseWatchLogListVONew" resultType="com.fs.course.vo.FsCourseWatchLogListVO">
         SELECT

+ 7 - 0
fs-service-system/src/main/resources/mapper/course/FsUserCourseMapper.xml

@@ -326,4 +326,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
         order by c.course_id
     </select>
+    <select id="selectFsUserCourseAllList" resultType="com.fs.his.vo.OptionsVO">
+        select course_id dict_value, course_name dict_label,img_url dict_imgUrl  from fs_user_course
+                                                                                 where is_del = 0 and is_private = 1
+        <if test="userId != null">
+            and user_id = #{userId}
+        </if>
+    </select>
 </mapper>

+ 15 - 3
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>
@@ -313,7 +315,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         order by video.course_sort
     </select>
     <select id="selectFsUserCourseVideoByVideoIdAndUserId" resultType="com.fs.course.domain.FsUserCourseVideo">
-
+        select *  from fs_user_course_video
+                                                      where video_id=#{videoId} and is_del = 0
+        <if test="userId != null">
+            user_id = #{userId}
+        </if>
+    </select>
+    <select id="selectFsUserCourseVodeAllList" resultType="com.fs.his.vo.OptionsVO">
+        select video_id dict_value, title dict_label  from fs_user_course_video where course_id=#{id} and is_del = 0
+        <if test="userId != null">
+            and user_id = #{userId}
+        </if>
     </select>
 
     <update id="updateRedPacketMoney">

+ 40 - 3
fs-service-system/src/main/resources/mapper/store/FsUserMapper.xml

@@ -480,6 +480,12 @@
         fs_user
         <where>
             fs_user.is_del = 0
+            <if test="companyId != null">
+                AND fs_user.company_id = #{companyId}
+            </if>
+            <if test="companyUserId != null and companyUserId != '' ">
+                AND fs_user.company_user_id = #{companyUserId}
+            </if>
             <if test="registerStartTime != null and registerStartTime !='' ">
                 AND fs_user.create_time &gt;= #{registerStartTime}
             </if>
@@ -493,10 +499,10 @@
                 </foreach>
             </if>
             <if test="nickname != null and nickname != ''">
-                AND fs_user.nickname like concat(#{nickname},'%')
+                AND fs_user.nickname like concat('%', #{nickname},'%')
             </if>
             <if test="phone != null and phone != ''">
-                AND fs_user.phone = #{phone}
+                AND fs_user.phone like concat('%', #{phone},'%')
             </if>
         </where>
         limit ${(pageNum-1)*pageSize},${pageSize}
@@ -1491,6 +1497,12 @@
         fs_user
         <where>
             fs_user.is_del = 0
+            <if test="companyId != null">
+                AND fs_user.company_id = #{companyId}
+            </if>
+            <if test="companyUserId != null and companyUserId != '' ">
+                AND fs_user.company_user_id = #{companyUserId}
+            </if>
             <if test="registerStartTime != null and registerStartTime !='' ">
                 AND fs_user.create_time &gt;= #{registerStartTime}
             </if>
@@ -1507,7 +1519,7 @@
                 AND fs_user.nickname like concat(#{nickname},'%')
             </if>
             <if test="phone != null and phone!=''">
-                AND fs_user.phone = #{phone}
+                AND fs_user.phone like concat('%', #{phone},'%')
             </if>
         </where>
     </select>
@@ -1557,6 +1569,17 @@
         </foreach>
     </update>
 
+    <update id="batchUpdateCompanyUserRelation">
+        update fs_user_company_user
+        set company_id = #{companyId},
+        company_user_id = #{companyUserId}
+        where is_repeat_fans = 0 and
+        <foreach collection="userIds" open="(" close=")" separator="or" item="userId" index="index">
+           user_id = #{userId}
+        </foreach>
+    </update>
+
+
     <select id="selectUserListByMap" resultType="com.fs.his.vo.OptionsVO">
         select
             u.user_id dictValue,
@@ -1688,4 +1711,18 @@
         fs_user.company_user_id, date(fs_user.create_time)
     </select>
 
+
+    <select id="selectFsUserListByJointUserNameKey" parameterType="FsUser" resultMap="FsUserResult">
+        <include refid="selectFsUserVo"/>
+        <where>
+            <if test="userName != null  and userName != ''">
+                AND (
+                nickname like concat('%', #{userName}, '%')
+                or  user_id LIKE concat('%',#{userName},'%')
+                )
+            </if>
+        </where>
+        order by user_id desc
+    </select>
+
 </mapper>