|
@@ -11,10 +11,7 @@ import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.course.cache.FsUserCourseCategoryCacheService;
|
|
|
import com.fs.course.config.CourseConfig;
|
|
|
-import com.fs.course.domain.FsCourseAnswerLogs;
|
|
|
-import com.fs.course.domain.FsCourseQuestionBank;
|
|
|
-import com.fs.course.domain.FsCourseWatchLog;
|
|
|
-import com.fs.course.domain.FsUserCourseCategory;
|
|
|
+import com.fs.course.domain.*;
|
|
|
import com.fs.course.dto.FsCourseQuestionBankImportDTO;
|
|
|
import com.fs.course.mapper.*;
|
|
|
import com.fs.course.param.FsCourseQuestionAnswerUParam;
|
|
@@ -171,7 +168,11 @@ public class FsCourseQuestionBankServiceImpl implements IFsCourseQuestionBankSer
|
|
|
if (param.getLinkType()!=null&¶m.getLinkType()==1){
|
|
|
rightLog = courseAnswerLogsMapper.selectRightLogByCourseVideo(param.getVideoId(), param.getUserId(),null);
|
|
|
if (rightLog!=null){
|
|
|
- return R.error("该课程已答题完成,不可重复答题");
|
|
|
+ // 增加判断,去查询红包记录是否已发送成功,如果成功,则返回当前提示,否则返回答题成功(让其可以继续答题,直到红包领取完成)
|
|
|
+ FsCourseRedPacketLog fsCourseRedPacketLog = redPacketLogMapper.selectUserFsCourseRedPacketLog(param.getVideoId(), param.getUserId(),param.getPeriodId());
|
|
|
+ if(fsCourseRedPacketLog != null && fsCourseRedPacketLog.getStatus() == 1){
|
|
|
+ return R.error("该课程已答题完成,不可重复答题");
|
|
|
+ }
|
|
|
}
|
|
|
errorCount = courseAnswerLogsMapper.selectErrorCountByCourseVideo(param.getVideoId(), param.getUserId(),null);
|
|
|
|
|
@@ -193,7 +194,13 @@ public class FsCourseQuestionBankServiceImpl implements IFsCourseQuestionBankSer
|
|
|
rightLog = courseAnswerLogsMapper.selectRightLogByCourseVideo(param.getVideoId(), param.getUserId(), param.getQwUserId());
|
|
|
if (rightLog != null) {
|
|
|
if (log.getRewardType() != null) {
|
|
|
- return R.error("该课程已答题完成,不可重复答题");
|
|
|
+ // 增加判断,去查询红包记录是否已发送成功,如果成功,则返回当前提示,否则返回答题成功(让其可以继续答题,直到红包领取完成)
|
|
|
+ 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("答题成功");
|
|
|
}
|