|
@@ -4,16 +4,22 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.miaxis.common.constant.Constants;
|
|
import com.miaxis.common.constant.Constants;
|
|
import com.miaxis.common.core.controller.BaseController;
|
|
import com.miaxis.common.core.controller.BaseController;
|
|
import com.miaxis.common.core.domain.Response;
|
|
import com.miaxis.common.core.domain.Response;
|
|
|
|
+import com.miaxis.common.core.page.ResponsePageInfo;
|
|
|
|
+import com.miaxis.teachingVideo.domain.TeachingVideoInfo;
|
|
import com.miaxis.teachingVideo.domain.TeachingVideoTypeInfo;
|
|
import com.miaxis.teachingVideo.domain.TeachingVideoTypeInfo;
|
|
|
|
+import com.miaxis.teachingVideo.dto.TeachingVideoInfoTypeIdDto;
|
|
import com.miaxis.teachingVideo.service.ITeachingVideoInfoService;
|
|
import com.miaxis.teachingVideo.service.ITeachingVideoInfoService;
|
|
import com.miaxis.teachingVideo.service.ITeachingVideoTypeInfoService;
|
|
import com.miaxis.teachingVideo.service.ITeachingVideoTypeInfoService;
|
|
|
|
+import com.miaxis.teachingVideo.vo.AppletTeachingVideoTypeInfoVo;
|
|
import com.miaxis.teachingVideo.vo.TeachingVideoInfoVo;
|
|
import com.miaxis.teachingVideo.vo.TeachingVideoInfoVo;
|
|
-import io.swagger.annotations.Api;
|
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
-import io.swagger.annotations.ApiParam;
|
|
|
|
|
|
+import com.miaxis.teachingVideo.vo.TeachingVideoTypeInfoVo;
|
|
|
|
+import io.swagger.annotations.*;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 【教学视频】Controller
|
|
* 【教学视频】Controller
|
|
* @author wwl
|
|
* @author wwl
|
|
@@ -30,23 +36,24 @@ public class AppletTeachingVideoInfoController extends BaseController {
|
|
|
|
|
|
private final ITeachingVideoTypeInfoService videoTypeInfoService;
|
|
private final ITeachingVideoTypeInfoService videoTypeInfoService;
|
|
|
|
|
|
-
|
|
|
|
|
|
+ /**
|
|
@GetMapping("/typeList")
|
|
@GetMapping("/typeList")
|
|
@ApiOperation("查询教学视频一级分类列表")
|
|
@ApiOperation("查询教学视频一级分类列表")
|
|
public Response typeList(){
|
|
public Response typeList(){
|
|
return Response.success(videoTypeInfoService.list(new QueryWrapper<TeachingVideoTypeInfo>().eq("pid",0).eq("status",0).orderByAsc("type_sort")));
|
|
return Response.success(videoTypeInfoService.list(new QueryWrapper<TeachingVideoTypeInfo>().eq("pid",0).eq("status",0).orderByAsc("type_sort")));
|
|
}
|
|
}
|
|
|
|
+ */
|
|
|
|
|
|
/**
|
|
/**
|
|
* 查询教学视频列表
|
|
* 查询教学视频列表
|
|
- */
|
|
|
|
|
|
+
|
|
@GetMapping("/list/{pid}")
|
|
@GetMapping("/list/{pid}")
|
|
@ApiOperation("查询教学视频列表")
|
|
@ApiOperation("查询教学视频列表")
|
|
public Response list(@ApiParam(name = "pid", value = "分类id", required = true)
|
|
public Response list(@ApiParam(name = "pid", value = "分类id", required = true)
|
|
@PathVariable("pid") String pid){
|
|
@PathVariable("pid") String pid){
|
|
return teachingVideoInfoService.queryTeachingVideoInfoList(pid);
|
|
return teachingVideoInfoService.queryTeachingVideoInfoList(pid);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ */
|
|
@GetMapping(value = "/{id}")
|
|
@GetMapping(value = "/{id}")
|
|
@ApiOperation("获取教学视频详细信息")
|
|
@ApiOperation("获取教学视频详细信息")
|
|
public Response<TeachingVideoInfoVo> getInfo(
|
|
public Response<TeachingVideoInfoVo> getInfo(
|
|
@@ -67,5 +74,27 @@ public class AppletTeachingVideoInfoController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 根据分类ID 查询教学视频
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/getTeachingVideoByTypeId")
|
|
|
|
+ @ApiOperation("根据分类ID查询教学视频")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
|
|
|
|
+ @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
|
|
|
|
+ })
|
|
|
|
+ public Response getTeachingVideoByTypeId(@ModelAttribute TeachingVideoInfoTypeIdDto teachingVideoInfoTypeIdDto){
|
|
|
|
+ startPage();
|
|
|
|
+ return teachingVideoInfoService.getTeachingVideoByTypeId(teachingVideoInfoTypeIdDto.getVideoTypeId());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 查询教学视频分类树形列表
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/treeList")
|
|
|
|
+ @ApiOperation("查询教学视频分类树形列表")
|
|
|
|
+ public Response<List<AppletTeachingVideoTypeInfoVo>> treeList(){
|
|
|
|
+ return videoTypeInfoService.selectAppletTeachingVideoTypeInfoTreeList();
|
|
|
|
+ }
|
|
}
|
|
}
|