|
@@ -41,8 +41,7 @@ public class FileController {
|
|
|
public Map<String, Object> imageCheck(String code, String videoId) {
|
|
|
return materialImageInfoService.checkMaterialInfo(code, videoId);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
@PostMapping("/insertV2")
|
|
|
public Map<String, Object> insertV2(@RequestBody JSONObject json) {
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
@@ -50,6 +49,21 @@ public class FileController {
|
|
|
return materialInfoService.correlationUpload(json);
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/insertV3")
|
|
|
+ public Map<String, Object> insertV3(@RequestBody JSONArray array) {
|
|
|
+ Map<String,Object>result = new HashMap<>();
|
|
|
+ LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ if(null!=array&&!array.isEmpty()){
|
|
|
+ for (int i=0;i<array.size();i++){
|
|
|
+ JSONObject json = array.getJSONObject(i);
|
|
|
+ json.put("userId", user.getId());
|
|
|
+ materialInfoService.correlationUpload(json);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@PostMapping("/insertImage")
|
|
|
public Map<String, Object> insertImage(@RequestBody JSONObject json) {
|