|
@@ -942,22 +942,28 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
logger.error("未答题:{}",param.getUserId());
|
|
|
return R.error("未答题");
|
|
|
}
|
|
|
- if (log.getRewardType() != null) {
|
|
|
- FsCourseRedPacketLog fsCourseRedPacketLog = redPacketLogMapper.selectUserFsCourseRedPacketLog(param.getVideoId(), param.getUserId(),param.getPeriodId());
|
|
|
- if(fsCourseRedPacketLog != null && fsCourseRedPacketLog.getStatus() == 1) {
|
|
|
- return R.error("已领取该课程奖励,不可重复领取!");
|
|
|
- }
|
|
|
- if(fsCourseRedPacketLog != null && fsCourseRedPacketLog.getStatus() == 0) {
|
|
|
- if(StringUtils.isNotEmpty(fsCourseRedPacketLog.getResult())){
|
|
|
- R r = JSON.parseObject(fsCourseRedPacketLog.getResult(), R.class);
|
|
|
- return r;
|
|
|
- } else {
|
|
|
- return R.error("操作频繁,请稍后再试!");
|
|
|
+ if (log.getRewardType() != null ) {
|
|
|
+ if (log.getRewardType() == 1){
|
|
|
+ FsCourseRedPacketLog fsCourseRedPacketLog = redPacketLogMapper.selectUserFsCourseRedPacketLog(param.getVideoId(), param.getUserId(),param.getPeriodId());
|
|
|
+ if(fsCourseRedPacketLog != null && fsCourseRedPacketLog.getStatus() == 1) {
|
|
|
+ return R.error("已领取该课程奖励,不可重复领取!");
|
|
|
}
|
|
|
+ if(fsCourseRedPacketLog != null && fsCourseRedPacketLog.getStatus() == 0) {
|
|
|
+ if(StringUtils.isNotEmpty(fsCourseRedPacketLog.getResult())){
|
|
|
+ R r = JSON.parseObject(fsCourseRedPacketLog.getResult(), R.class);
|
|
|
+ return r;
|
|
|
+ } else {
|
|
|
+ return R.error("操作频繁,请稍后再试!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else if (log.getRewardType() == 2){
|
|
|
+ return R.error("已领取该课程奖励,不可重复领取!");
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
// 获取视频信息
|
|
|
FsUserCourseVideo video = fsUserCourseVideoMapper.selectFsUserCourseVideoByVideoId(param.getVideoId());
|
|
|
|