|
|
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.JsonNode;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
+import com.fs.app.annotation.Anonymous;
|
|
|
import com.fs.app.annotation.Login;
|
|
|
import com.fs.app.annotation.UserOperationLog;
|
|
|
import com.fs.app.controller.AppBaseController;
|
|
|
@@ -132,6 +133,7 @@ public class CourseQwController extends AppBaseController {
|
|
|
return R.ok().put("data",courseVideos);
|
|
|
}
|
|
|
|
|
|
+ @Anonymous
|
|
|
@ApiOperation("h5课程简介")
|
|
|
@GetMapping("/getH5CourseByVideoId")
|
|
|
public R getCourseByVideoId(@RequestParam("videoId") Long videoId,HttpServletRequest request)
|
|
|
@@ -202,12 +204,11 @@ public class CourseQwController extends AppBaseController {
|
|
|
|
|
|
getGoodsAndShow(param,course);
|
|
|
|
|
|
- //将视频时长也存到redis
|
|
|
+ //将视频时长也存到redis(兼容 Redis 反序列化为 Integer,避免 Integer→Long 强转失败)
|
|
|
String videoRedisKey = "h5user:video:duration:" + param.getVideoId();
|
|
|
- Long videoDuration = redisCache.getCacheObject(videoRedisKey, Long.class);
|
|
|
- if (videoDuration==null){
|
|
|
-
|
|
|
- redisCache.setCacheObject(videoRedisKey,course.getDuration());
|
|
|
+ Object videoDuration = redisCache.getCacheObject(videoRedisKey);
|
|
|
+ if (videoDuration == null && course.getDuration() != null) {
|
|
|
+ redisCache.setCacheObject(videoRedisKey, course.getDuration());
|
|
|
}
|
|
|
// 返回是否开启评论/弹幕。优先获取sop任务配置的是否开启评论/弹幕,如果没有配置就取总后台的配置;
|
|
|
QwSop qwSop = qwSopService.selectQwSopById(log.getSopId());
|
|
|
@@ -340,6 +341,7 @@ public class CourseQwController extends AppBaseController {
|
|
|
return courseVideoService.sendReward(param);
|
|
|
}
|
|
|
|
|
|
+ @Anonymous
|
|
|
@ApiOperation("获取真实链接")
|
|
|
@GetMapping("/getRealLink")
|
|
|
public R getRealLink(@RequestParam("sortLink")String link)
|