zx 1 dienu atpakaļ
vecāks
revīzija
8d8c4e69b2

+ 6 - 10
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -829,7 +829,11 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
         FsCourseWatchLog log = new FsCourseWatchLog();
 
         // 根据链接类型判断是否已发放奖励
-        if (param.getLinkType() != null && param.getLinkType() == 1) {
+        log = courseWatchLogMapper.getWatchCourseVideo(param.getUserId(), param.getVideoId(), param.getQwUserId(), param.getQwExternalId());
+        if (log == null) {
+            return R.error("无记录");
+        }
+        if (log.getRewardType() != null) {
             FsCourseRedPacketLog packetLog = redPacketLogMapper.selectFsCourseRedPacketLogByTemporary(param.getVideoId(), param.getUserId());
             if(packetLog != null && packetLog.getStatus() == 1) {
                 return R.error("奖励已发放");
@@ -845,16 +849,8 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             if(packetLog != null && packetLog.getStatus() == 2) {
                 return R.error("请联系客服补发");
             }
-        } else {
-            log = courseWatchLogMapper.getWatchCourseVideo(param.getUserId(), param.getVideoId(), param.getQwUserId(), param.getQwExternalId());
-            if (log == null) {
-                return R.error("无记录");
-            }
-            if (log.getRewardType() != null) {
-                return R.error("奖励已发放");
-            }
+            return R.error("奖励已发放");
         }
-
         // 获取视频信息
         FsUserCourseVideo video = fsUserCourseVideoMapper.selectFsUserCourseVideoByVideoId(param.getVideoId());