From 3694099406d6f0e475dc5fa62b35304b40823824 Mon Sep 17 00:00:00 2001 From: x ronger Date: Sun, 24 Nov 2019 11:47:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=91=E5=B8=83=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E6=97=B6=E6=A0=A1=E9=AA=8C=20token=20=E6=97=B6?= =?UTF-8?q?=E6=95=88=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vertical/web/api/common/UploadController.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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