|
@@ -1,10 +1,12 @@
|
|
|
package cn.com.ctop.material.controller;
|
|
|
|
|
|
import cn.com.ctop.material.service.IMaterialUploadTaskService;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
/**
|
|
@@ -18,13 +20,15 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@RestController
|
|
|
@RequestMapping("/material/materialUploadTask")
|
|
|
public class MaterialUploadTaskController {
|
|
|
- @Autowired
|
|
|
- private IMaterialUploadTaskService materialUploadTaskService;
|
|
|
-
|
|
|
- @GetMapping("/uploadMaterial")
|
|
|
- public String uploadVideo(String signature) {
|
|
|
- materialUploadTaskService.upload(signature);
|
|
|
- return "success";
|
|
|
- }
|
|
|
+ @Autowired private IMaterialUploadTaskService materialUploadTaskService;
|
|
|
|
|
|
+ @ResponseBody
|
|
|
+ @GetMapping("/uploadMaterial")
|
|
|
+ public JSONObject uploadVideo(String signature) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ materialUploadTaskService.upload(signature);
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("message", "任务提交成功");
|
|
|
+ return returnJson;
|
|
|
+ }
|
|
|
}
|