BUGFIX: library upload md5重复校验优化;
This commit is contained in:
@@ -72,7 +72,8 @@ public class LibraryController {
|
||||
@ApiParam("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
@RequestParam(value = "timeZone") String timeZone,
|
||||
@RequestParam(value = "modelType") String modelType,
|
||||
@RequestParam(value = "sex") String sex) {
|
||||
@RequestParam(value = "sex") String sex,
|
||||
@RequestParam(value = "checkMd5") Integer checkMd5) {
|
||||
Assert.isTrue(!StringUtils.isEmpty(file.getOriginalFilename()),"Please select a file!");
|
||||
Integer high =null;
|
||||
Integer width =null;
|
||||
@@ -87,8 +88,12 @@ public class LibraryController {
|
||||
high = fileVO.getHigh();
|
||||
width = fileVO.getWidth();
|
||||
}
|
||||
String md5 = MD5Utils.encryptFile(file);
|
||||
if (checkMd5 == null || checkMd5 == 1) {
|
||||
libraryService.checkMd5(level1Type, level2Type, sex, md5);
|
||||
}
|
||||
return Response.success(libraryService.upload(new LibraryUploadDTO(file, level1Type,level2Type,
|
||||
timeZone, MD5Utils.encryptFile(file),high,width,modelType,sex)));
|
||||
timeZone, md5,high,width,modelType,sex)));
|
||||
}
|
||||
@ApiOperation(value = "保存或者编辑template打点")
|
||||
@PostMapping("/saveOrEditTemplatePoint")
|
||||
|
||||
Reference in New Issue
Block a user