Commit 479754df authored by root's avatar root

Merge branch 'meiteng' of ssh://103.249.252.28:10022/lcy/education into meiteng

parents 803abedf bc015db1
...@@ -71,10 +71,7 @@ public interface BChapterRepository extends BaseMapper<BChapter> { ...@@ -71,10 +71,7 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
" bc.lesson_id,\n" + " bc.lesson_id,\n" +
" bc.sort," + " bc.sort," +
" bf.video_url AS videoUrl,\n" + " bf.video_url AS videoUrl,\n" +
" bf.file_url AS fileUrl,\n" + " bf.file_name AS fileName\n" +
" bf.ppt_url AS pptUrl,\n" +
" bf.pdf_url AS pdfUrl," +
" bf.video_name AS fileName\n" +
" FROM\n" + " FROM\n" +
" b_chapter bc\n" + " b_chapter bc\n" +
" LEFT JOIN b_file bf ON bf.chapter_id = bc.business_id " + " LEFT JOIN b_file bf ON bf.chapter_id = bc.business_id " +
......
...@@ -32,7 +32,7 @@ import java.util.List; ...@@ -32,7 +32,7 @@ import java.util.List;
*/ */
@Api(tags = "04 文件") @Api(tags = "04 文件")
@RestController @RestController
@RequestMapping("/BVideo") @RequestMapping("/bfile")
public class BFileController extends PaginationController<BFile> { public class BFileController extends PaginationController<BFile> {
@Autowired @Autowired
private BFileService bFileService; private BFileService bFileService;
...@@ -40,15 +40,12 @@ public class BFileController extends PaginationController<BFile> { ...@@ -40,15 +40,12 @@ public class BFileController extends PaginationController<BFile> {
private Global global; private Global global;
@ApiOperation(value="401 上传文件", notes="上传文件") @ApiOperation(value="401 上传文件", notes="上传文件")
@ApiImplicitParams({@ApiImplicitParam(name = "chapterId", value = "章节ID", required = true, dataType = "varchar"), @ApiImplicitParam(name = "file", value = "视频文件", required = true, dataType = "MultipartFile")
@ApiImplicitParam(name = "type", value = "0视频 1音频 2ppt 3pdf 4附件", required = true, dataType = "varchar"), @PostMapping(value = "/upload")
@ApiImplicitParam(name = "lessonId", value = "章节所在课程id", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "file", value = "视频文件", required = true, dataType = "MultipartFile")})
@PostMapping(value = "/uploadVideo")
public Result uploadVideo(BFile bFile, HttpServletRequest request) { public Result uploadVideo(BFile bFile, HttpServletRequest request) {
List<MultipartFile> list = ((MultipartHttpServletRequest)request).getFiles("file"); List<MultipartFile> list = ((MultipartHttpServletRequest)request).getFiles("file");
String videoUrl = bFileService.uploadVideoToServer(list, bFile);
String videoUrl = bFileService.uploadVideoToServer(list, bFile);
return Result.builder(new PersistModel(1), return Result.builder(new PersistModel(1),
"上传成功", "上传成功",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment