diff --git a/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/FileServiceImpl.java b/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/FileServiceImpl.java index bdc492e..ad8c89e 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/FileServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/idc/service/impl/FileServiceImpl.java @@ -52,6 +52,7 @@ public class FileServiceImpl implements FileService { @Resource private IdcService idcService; private String imagePath = "register/file/image2/"; + private String devImagePath = "register/file/device/"; @Override public BaseResponse fileUpload(HttpServletRequest request,Map params) { String host=""; @@ -128,13 +129,13 @@ public class FileServiceImpl implements FileService { ArrayList saveFiles = new ArrayList<>(); Date startTime = new Date(); if (files != null) { - if(!FileUtils.makeDirectory(filePath + filePathSlash + imagePath)) - IDCUtils.createDirectory(filePath + filePathSlash + imagePath); + if(!FileUtils.makeDirectory(filePath + filePathSlash + devImagePath)) + IDCUtils.createDirectory(filePath + filePathSlash + devImagePath); try { for (MultipartFile file : files) { - String imageName = filePath + filePathSlash + imagePath + file.getOriginalFilename(); + String imageName = filePath + filePathSlash + devImagePath + file.getOriginalFilename(); saveFiles.add(imageName); - IDCUtils.writeFile(file.getBytes(), filePath + filePathSlash + imagePath, file.getOriginalFilename()); + IDCUtils.writeFile(file.getBytes(), filePath + filePathSlash + devImagePath, file.getOriginalFilename()); } } catch (IOException e) { // TODO Auto-generated catch block