Browse Source

FIX:参与记录查询修改

Long 3 tuần trước cách đây
mục cha
commit
1c096648c0

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

@@ -108,12 +108,14 @@ public class FsUserCourseVideoController extends AppBaseController {
     @GetMapping("/participationRecord")
     public ResponseResult<Object> participationRecord(@RequestParam Long videoId,
                                                       @RequestParam Integer type,
+                                                      @RequestParam(required = false) Long periodId,
                                                       @RequestParam(required = false) String keyword,
                                                       @RequestParam(required = false, defaultValue = "1") Integer pageNum,
                                                       @RequestParam(required = false, defaultValue = "10") Integer pageSize) {
         log.debug("参与记录 videoId:{}, type:{}, keyword: {}, pageNum: {}, pageSize: {}", videoId, type, keyword, pageNum, pageSize);
         Map<String, Object> params = new HashMap<>();
         params.put("videoId", videoId);
+        params.put("periodId", periodId);
         params.put("type", type);
         params.put("keyword", keyword);
 

+ 4 - 1
fs-service/src/main/resources/mapper/course/FsUserCourseMapper.xml

@@ -106,7 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         from fs_user_course_video fucv
         inner join fs_course_watch_log fcwl on fcwl.video_id = fucv.video_id
         inner join fs_user fu on fu.user_id = fcwl.user_id
-        where fucv.video_id = #{params.videoId}
+        where fucv.video_id = #{params.videoId} and fcwl.send_type = 1
         <if test="params.keyword != null and params.keyword != ''">
             and (
             fu.user_id = #{params.keyword}
@@ -118,6 +118,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="params.companyUserId != null">
             and fcwl.company_user_id = #{params.companyUserId}
         </if>
+        <if test="params.periodId != null">
+            and fcwl.period_id = #{params.periodId}
+        </if>
         <if test="params.companyId != null">
             and fcwl.company_id = #{params.companyId}
         </if>