|
@@ -76,33 +76,34 @@ public class UploadController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// @ApiOperation(value = "智能预问诊-多个文件上传同时生成缩略图")
|
|
|
|
+// @CrossOrigin(allowCredentials = "true", allowedHeaders = "*", methods = { RequestMethod.POST }, origins = "*")
|
|
|
|
+// @PostMapping(value = "/uploadImageThums", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
|
+// public RespDTO<List<FileThumDTO>> multiFileThumUpload(@RequestParam("upfiles") MultipartFile[] file, @RequestParam("type") Integer[] type) {
|
|
|
|
+// List<FileThumDTO> data = uploadFacade.multiFileThumUpload(file, type);
|
|
|
|
+// String msg = "";
|
|
|
|
+// if (ListUtil.isNotEmpty(data)) {
|
|
|
|
+// for (int i = 0; i < data.size(); i++) {
|
|
|
|
+// if (data.get(i).getSource() != null && data.get(i).getSource().getState().equals("FAILURE")) {
|
|
|
|
+// msg += "第【" + (i + 1) + "】张图片上传失败," + data.get(i).getSource().getInfo() + ";";
|
|
|
|
+// }
|
|
|
|
+// if (data.get(i).getThumbnail() != null && data.get(i).getThumbnail().getState().equals("FAILURE")) {
|
|
|
|
+// msg += "第【" + (i + 1) + "】张图片缩略图上传失败," + data.get(i).getThumbnail().getInfo() + ";";
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// if (StringUtil.isNotBlank(msg)) {
|
|
|
|
+// return RespDTO.onError(msg);
|
|
|
|
+// } else {
|
|
|
|
+// return RespDTO.onSuc(data);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+
|
|
@ApiOperation(value = "智能预问诊-多个文件上传同时生成缩略图")
|
|
@ApiOperation(value = "智能预问诊-多个文件上传同时生成缩略图")
|
|
@CrossOrigin(allowCredentials = "true", allowedHeaders = "*", methods = { RequestMethod.POST }, origins = "*")
|
|
@CrossOrigin(allowCredentials = "true", allowedHeaders = "*", methods = { RequestMethod.POST }, origins = "*")
|
|
@PostMapping(value = "/uploadImageThums", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
@PostMapping(value = "/uploadImageThums", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
public RespDTO<List<FileThumDTO>> multiFileThumUpload(@RequestParam("upfiles") MultipartFile[] file, @RequestParam("type") Integer[] type) {
|
|
public RespDTO<List<FileThumDTO>> multiFileThumUpload(@RequestParam("upfiles") MultipartFile[] file, @RequestParam("type") Integer[] type) {
|
|
- List<FileThumDTO> data = uploadFacade.multiFileThumUpload(file, type);
|
|
|
|
- String msg = "";
|
|
|
|
- if (ListUtil.isNotEmpty(data)) {
|
|
|
|
- for (int i = 0; i < data.size(); i++) {
|
|
|
|
- if (data.get(i).getSource() != null && data.get(i).getSource().getState().equals("FAILURE")) {
|
|
|
|
- msg += "第【" + (i + 1) + "】张图片上传失败," + data.get(i).getSource().getInfo() + ";";
|
|
|
|
- }
|
|
|
|
- if (data.get(i).getThumbnail() != null && data.get(i).getThumbnail().getState().equals("FAILURE")) {
|
|
|
|
- msg += "第【" + (i + 1) + "】张图片缩略图上传失败," + data.get(i).getThumbnail().getInfo() + ";";
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (StringUtil.isNotBlank(msg)) {
|
|
|
|
- return RespDTO.onError(msg);
|
|
|
|
- } else {
|
|
|
|
- return RespDTO.onSuc(data);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @ApiOperation(value = "智能预问诊-多个文件上传同时生成缩略图")
|
|
|
|
- @CrossOrigin(allowCredentials = "true", allowedHeaders = "*", methods = { RequestMethod.POST }, origins = "*")
|
|
|
|
- @PostMapping(value = "/uploadImageThums2", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
|
- public RespDTO<List<FileThumDTO>> multiFileThumUpload2(@RequestParam("upfiles") MultipartFile[] file, @RequestParam("type") Integer[] type) {
|
|
|
|
List<FileThumDTO> data = uploadFacade.multiFileThumUpload2(file, type);
|
|
List<FileThumDTO> data = uploadFacade.multiFileThumUpload2(file, type);
|
|
String msg = "";
|
|
String msg = "";
|
|
if (ListUtil.isNotEmpty(data)) {
|
|
if (ListUtil.isNotEmpty(data)) {
|