|
@@ -3,7 +3,7 @@ package org.jeecg.modules.ctop.controller;
|
|
|
|
|
|
import cn.com.ctop.common.module.entity.MaterialInfo;
|
|
import cn.com.ctop.common.module.entity.MaterialInfo;
|
|
import cn.com.ctop.common.module.service.IMaterialInfoService;
|
|
import cn.com.ctop.common.module.service.IMaterialInfoService;
|
|
-import cn.com.ctop.common.module.utils.*;
|
|
|
|
|
|
+import cn.com.ctop.common.module.utils.Check;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
@@ -35,7 +35,6 @@ import java.io.UnsupportedEncodingException;
|
|
import java.net.URLDecoder;
|
|
import java.net.URLDecoder;
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
-import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -61,26 +60,6 @@ public class MaterialInfoController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- @RequestMapping(value = "/getMd5", consumes = "multipart/form-data;charset=utf-8")
|
|
|
|
- public String getMd5(@RequestParam("multipartFile") MultipartFile multipartFile, HttpServletRequest request) throws IOException {
|
|
|
|
-
|
|
|
|
- Map<String, Object> returnMap = new HashMap<>();
|
|
|
|
- try {
|
|
|
|
- String savaPath = PropertiesUtils.getValue("kuaishou_config", "video_sava_path");
|
|
|
|
- FileUploadTool fileUploadTool = new FileUploadTool();
|
|
|
|
- FileEntity entity;
|
|
|
|
- entity = fileUploadTool.createFile(multipartFile, request, savaPath);
|
|
|
|
-
|
|
|
|
- String path = entity.getPath();
|
|
|
|
- String md5 = LoadFileUtil.getMD5(path);
|
|
|
|
- return md5;
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
- return null;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
@GetMapping(value = "/getDetail")
|
|
@GetMapping(value = "/getDetail")
|
|
public JSONObject getDetail(String materialId) {
|
|
public JSONObject getDetail(String materialId) {
|
|
|
|
|