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> {
" bc.lesson_id,\n" +
" bc.sort," +
" bf.video_url AS videoUrl,\n" +
" bf.file_url AS fileUrl,\n" +
" bf.ppt_url AS pptUrl,\n" +
" bf.pdf_url AS pdfUrl," +
" bf.video_name AS fileName\n" +
" bf.file_name AS fileName\n" +
" FROM\n" +
" b_chapter bc\n" +
" LEFT JOIN b_file bf ON bf.chapter_id = bc.business_id " +
......
......@@ -32,7 +32,7 @@ import java.util.List;
*/
@Api(tags = "04 文件")
@RestController
@RequestMapping("/BVideo")
@RequestMapping("/bfile")
public class BFileController extends PaginationController<BFile> {
@Autowired
private BFileService bFileService;
......@@ -40,15 +40,12 @@ public class BFileController extends PaginationController<BFile> {
private Global global;
@ApiOperation(value="401 上传文件", notes="上传文件")
@ApiImplicitParams({@ApiImplicitParam(name = "chapterId", value = "章节ID", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "type", value = "0视频 1音频 2ppt 3pdf 4附件", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "lessonId", value = "章节所在课程id", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "file", value = "视频文件", required = true, dataType = "MultipartFile")})
@PostMapping(value = "/uploadVideo")
@ApiImplicitParam(name = "file", value = "视频文件", required = true, dataType = "MultipartFile")
@PostMapping(value = "/upload")
public Result uploadVideo(BFile bFile, HttpServletRequest request) {
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),
"上传成功",
......
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