Kaynağa Gözat

FIX:参与记录查询修改

Long 3 hafta önce
ebeveyn
işleme
bbcaea70cc

+ 2 - 2
fs-service/src/main/java/com/fs/course/mapper/FsCourseAnswerLogsMapper.java

@@ -120,8 +120,8 @@ public interface FsCourseAnswerLogsMapper
             "</script>"})
     int selectErrorCountByCourseVideo(@Param("videoId") Long videoId,@Param("userId") Long userId,@Param("qwUserId") String qwUserId);
 
-    @Select("select count(log_id) from fs_course_red_packet_log where user_id = #{userId} and video_id = #{videoId}")
-    Long selectRedStatus(@Param("userId") Long userId, @Param("videoId") Long videoId);
+    @Select("select count(log_id) from fs_course_red_packet_log where user_id = #{userId} and video_id = #{videoId} and period_id = #{periodId}")
+    Long selectRedStatus(@Param("userId") Long userId, @Param("videoId") Long videoId, @Param("periodId") Long periodId);
 
     List<FsCourseAnswerLogsListVO> selectFsCourseAnswerLogsListVONew(FsCourseAnswerLogsParam param);
 

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

@@ -540,7 +540,7 @@ public class FsUserCourseServiceImpl implements IFsUserCourseService
             recordVO.setWatchLxCount(lxDay);
 
             // 领取状态
-            Long count = fsCourseAnswerLogsMapper.selectRedStatus(recordVO.getUserId(), recordVO.getVideoId());
+            Long count = fsCourseAnswerLogsMapper.selectRedStatus(recordVO.getUserId(), recordVO.getVideoId(), (Long) params.get("periodId"));
             if (Objects.nonNull(count) && count > 0) {
                 recordVO.setRedStatus(1);
             } else {