diff --git a/src/main/java/com/rymcu/vertical/web/api/common/UploadController.java b/src/main/java/com/rymcu/vertical/web/api/common/UploadController.java index 2eb70c8..e62885e 100644 --- a/src/main/java/com/rymcu/vertical/web/api/common/UploadController.java +++ b/src/main/java/com/rymcu/vertical/web/api/common/UploadController.java @@ -2,8 +2,10 @@ package com.rymcu.vertical.web.api.common; import com.rymcu.vertical.core.result.GlobalResult; import com.rymcu.vertical.core.result.GlobalResultGenerator; +import com.rymcu.vertical.dto.TUser; import com.rymcu.vertical.jwt.def.JwtConstants; import com.rymcu.vertical.util.FileUtils; +import com.rymcu.vertical.util.UserUtils; import com.rymcu.vertical.util.Utils; import com.rymcu.vertical.web.api.exception.ErrorCode; import com.rymcu.vertical.web.api.exception.MallApiException; @@ -53,7 +55,7 @@ public class UploadController { } String localPath = Utils.getProperty("resource.file-path")+"/"+typePath+"/"; - Map succMap = new HashMap(); + Map succMap = new HashMap(10); Set errFiles = new HashSet(); String orgName = multipartFile.getOriginalFilename(); @@ -68,7 +70,7 @@ public class UploadController { } catch (IOException e) { errFiles.add(orgName); } - Map data = new HashMap(); + Map data = new HashMap(2); data.put("errFiles",errFiles); data.put("succMap",succMap); return GlobalResultGenerator.genSuccessResult(data); @@ -97,7 +99,7 @@ public class UploadController { } String localPath = Utils.getProperty("resource.file-path")+"/"+typePath+"/"; - Map succMap = new HashMap(); + Map succMap = new HashMap(10); Set errFiles = new HashSet(); for(int i=0,len=multipartFiles.length;i