Browse Source

Merge remote-tracking branch 'origin/bly_store' into bly_store

xgb 1 month ago
parent
commit
410a2bb8fe

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

@@ -282,7 +282,17 @@ public class FsCourseQuestionBankServiceImpl implements IFsCourseQuestionBankSer
 
             rightLog = courseAnswerLogsMapper.selectRightLogByCourseVideoIsOpen(param.getVideoId(), param.getUserId());
             if (rightLog != null) {
-                return R.ok("答题成功");
+                if (log.getRewardType() != null) {
+                    // 增加判断,去查询红包记录是否已发送成功,如果成功,则返回当前提示,否则返回答题成功(让其可以继续答题,直到红包领取完成)
+                    FsCourseRedPacketLog fsCourseRedPacketLog = redPacketLogMapper.selectUserFsCourseRedPacketLog(param.getVideoId(), param.getUserId(),param.getPeriodId());
+                    if(fsCourseRedPacketLog != null && fsCourseRedPacketLog.getStatus() == 1) {
+                        return R.error("该课程已答题完成,不可重复答题");
+                    } else {
+                        return R.ok("答题成功");
+                    }
+                } else {
+                    return R.ok("答题成功");
+                }
             }
             errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),param.getQwUserId());
         }