|
|
|
@ -6,10 +6,12 @@ import api.PageResult;
|
|
|
|
|
import api.Result;
|
|
|
|
|
import com.luoo.music.pojo.Essay;
|
|
|
|
|
import com.luoo.music.service.EssayService;
|
|
|
|
|
import com.luoo.music.service.S3Service;
|
|
|
|
|
import io.swagger.annotations.*;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.data.domain.Page;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 专栏文章后台管理Controller
|
|
|
|
@ -23,7 +25,8 @@ public class CMSEssayController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private EssayService essayService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private S3Service s3Service;
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "1.获取专栏文章列表",notes = "获取专栏文章列表,category=0代表全部文章, 1代表荐碟,2代表专访,3代表言之,4代表她说")
|
|
|
|
|
@GetMapping("/search/{category}/{page}/{size}")
|
|
|
|
@ -80,7 +83,13 @@ public class CMSEssayController {
|
|
|
|
|
return Result.success(essay);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "上传文件", notes = "上传文件")
|
|
|
|
|
@PostMapping("/upload")
|
|
|
|
|
public Result batchUpload(@ApiParam(value = "文件", required = true) @RequestParam("file") MultipartFile file) {
|
|
|
|
|
return s3Service.upload(file, Boolean.FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|