Browse Source

feat:看课统计人数恢复统计拉黑人数

caoliqin 1 week ago
parent
commit
e724181bfd

+ 2 - 2
fs-company-app/src/main/java/com/fs/app/controller/FsUserController.java

@@ -305,14 +305,14 @@ public class FsUserController extends AppBaseController {
         return ResponseResult.ok(fsUserService.companyUserSummaryCount(userId, companyUserId));
     }
 
-    @Login
+//    @Login
     @ApiOperation("会员关联绑定销售")
     @PostMapping("/beMember")
     public ResponseResult<Boolean> becomeMember(@Valid @RequestBody FsUserCourseBeMemberParam param) {
         return fsUserService.becomeMember(param);
     }
 
-    //    @Login
+    @Login
     @PostMapping("/userImage")
     @ApiOperation("生成分享会员海报")
     public R createCourseImage(@RequestBody FsUserCourseBeMemberImageParam param) {

+ 1 - 1
fs-service-system/src/main/resources/mapper/course/FsUserWatchStatisticsMapper.xml

@@ -119,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             fwl.company_id
         FROM
             fs_course_watch_log fwl
-                JOIN ( SELECT DISTINCT user_id FROM fs_user WHERE fs_user.is_del = 0 AND fs_user.`status` = 1 ) AS fs_user ON fs_user.user_id = fwl.user_id
+
         WHERE
             fwl.send_type = 1
         GROUP BY

+ 5 - 6
fs-service-system/src/main/resources/mapper/store/FsUserMapper.xml

@@ -871,7 +871,7 @@
                     count(distinct fcc.user_id )
                 FROM
                     fs_user_course_count fcc
-                        LEFT JOIN ( SELECT DISTINCT user_id, company_user_id, company_id FROM fs_user WHERE fs_user.is_del = 0 AND fs_user.`status` = 1 ) AS fs_user ON fs_user.user_id = fcc.user_id
+                        LEFT JOIN fs_user ON fs_user.user_id = fcc.user_id
                         LEFT JOIN company_user ON fs_user.company_user_id = company_user.user_id
                         LEFT JOIN fs_user_course_period_days fcpd ON FIND_IN_SET(fcpd.period_id, fcc.course_ids) > 0
                 <where>
@@ -904,7 +904,7 @@
                     count(distinct fcc.user_id )
                 FROM
                     fs_user_course_count fcc
-                        LEFT JOIN ( SELECT DISTINCT user_id, company_user_id, company_id FROM fs_user WHERE fs_user.is_del = 0 AND fs_user.`status` = 1 ) AS fs_user ON fs_user.user_id = fcc.user_id
+                        LEFT JOIN fs_user ON fs_user.user_id = fcc.user_id
                         LEFT JOIN company_user ON fs_user.company_user_id = company_user.user_id
                         LEFT JOIN fs_user_course_period_days fcpd ON FIND_IN_SET(fcpd.period_id, fcc.course_ids) > 0
                 <where>
@@ -1661,7 +1661,7 @@
             fwl.period_id, fwl.video_id, fwl.company_user_id, fwl.company_id
         FROM
             fs_course_watch_log fwl
-                JOIN ( SELECT DISTINCT user_id FROM fs_user WHERE fs_user.is_del = 0 AND fs_user.`status` = 1 ) AS fs_user ON fs_user.user_id = fwl.user_id
+
         WHERE
             fwl.send_type = 1
         GROUP BY
@@ -1771,7 +1771,7 @@
         LEFT JOIN fs_user on fs_user.user_id = l.user_id
         LEFT JOIN company_user ON l.company_user_id = company_user.user_id
         where
-        l.log_type != 3 and send_type = 1 AND fs_user.is_del = 0 AND fs_user.`status` = 1
+        l.log_type != 3 and send_type = 1
         <if test="userId != null and userId != 0 ">
             and (l.company_user_id = #{userId} OR company_user.parent_id = #{userId} )
         </if>
@@ -1803,7 +1803,7 @@
         LEFT JOIN fs_user on fs_user.user_id = l.user_id
         LEFT JOIN company_user ON l.company_user_id = company_user.user_id
         where
-        l.log_type = 2 and send_type = 1 AND fs_user.is_del = 0 AND fs_user.`status` = 1
+        l.log_type = 2 and send_type = 1
         <if test="userId != null and userId != 0 ">
             and (l.company_user_id = #{userId} OR company_user.parent_id = #{userId} )
         </if>
@@ -1841,7 +1841,6 @@
         WHERE
         l.log_type != 3
         AND send_type = 1
-        AND fs_user.is_del = 0 AND fs_user.`status` = 1
         <if test="userId != null and userId != 0 ">
             AND l.company_user_id = #{userId}
         </if>