vod普通加密
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.dao;
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.peanut.modules.common.entity.VodAesTokenEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface VodAesTokenDao extends MPJBaseMapper<VodAesTokenEntity> {
|
||||
}
|
||||
@@ -36,4 +36,6 @@ public class CourseCatalogueChapterVideoEntity {
|
||||
private UserCourseVideoPositionEntity userCourseVideoPositionEntity;
|
||||
@TableField(exist = false)
|
||||
private String videoUrl;
|
||||
@TableField(exist = false)
|
||||
private String Mp4Url;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.peanut.modules.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("vod_aes_token")
|
||||
public class VodAesTokenEntity {
|
||||
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private String token;
|
||||
|
||||
private Integer useCount;
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.peanut.modules.sociology.controller;
|
||||
|
||||
import com.aliyun.vod20170321.models.*;
|
||||
import com.aliyuncs.sts.model.v20150401.AssumeRoleResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.peanut.common.utils.PlayToken;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.common.utils.ShiroUtils;
|
||||
import com.peanut.common.utils.SpdbUtil;
|
||||
@@ -14,6 +16,7 @@ import com.peanut.modules.master.service.SysCourseDirectService;
|
||||
import com.peanut.modules.sociology.service.CourseCatalogueChapterService;
|
||||
import com.peanut.modules.sociology.service.CourseService;
|
||||
import com.peanut.modules.sociology.service.CourseSociologyService;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -42,6 +45,8 @@ public class CourseController {
|
||||
|
||||
@Autowired
|
||||
private UserCourseStudyingDao userCourseStudyingDao;
|
||||
@Autowired
|
||||
private PlayToken playToken;
|
||||
|
||||
/**
|
||||
* 获取用户最近学习课程列表
|
||||
@@ -193,6 +198,22 @@ public class CourseController {
|
||||
return courseCatalogueChapterVideoService.checkVideo(video);
|
||||
}
|
||||
|
||||
@RequestMapping("/mytt")
|
||||
public R mytt() throws Exception {
|
||||
String s = playToken.generateToken();
|
||||
System.out.println(s);
|
||||
boolean b = playToken.validateToken(s);
|
||||
System.out.println(b);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@RequestMapping("/ttt")
|
||||
@SneakyThrows
|
||||
public R ttt(){
|
||||
AssumeRoleResponse assumeRoleResponse = SpdbUtil.assumeRole();
|
||||
return R.ok().put("result",assumeRoleResponse);
|
||||
}
|
||||
|
||||
@RequestMapping("/getMyCourse")
|
||||
public R getMyCourse(@RequestBody Map<String,Integer> map){
|
||||
List courses = courseService.getMyCourse(map.get("type"));
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.peanut.modules.sys.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/sys/vodAli")
|
||||
public class VodAliController {
|
||||
|
||||
|
||||
@RequestMapping("/vodAliVideoRe")
|
||||
public void vodAliVideoRe(@RequestBody Map<String,Object> map){
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user