flower_city/src/main/java/com/dg/core/controller/CommonController.java
@@ -3,28 +3,25 @@ import com.dg.core.CorsConfig; import com.dg.core.ResultData; import com.dg.core.db.gen.AjaxResult; import com.dg.core.file.FileUploadUtils; import com.dg.core.file.FileUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import java.util.UUID; @Api(tags = {"通用接口"}) @RestController @RequestMapping("/common") public class CommonController extends BaseController { public class CommonController extends BaseController { private static final String FILE_DELIMETER = ","; @@ -39,42 +36,44 @@ } /** * 通用上传请求(多个) */ @ApiOperation("文件上传接口(通用)") @PostMapping("/uploads") public ResultData uploadFiles(List<MultipartFile> files) throws Exception { try { // 上传文件路径 String filePath = FileUploadUtils.defaultBaseDir; // String filePath = "D:/tupianshuju"; public ResultData uploadFiles(List<MultipartFile> files) throws Exception { List<String> urls = new ArrayList<String>(); List<String> fileNames = new ArrayList<String>(); List<String> newFileNames = new ArrayList<String>(); List<String> originalFilenames = new ArrayList<String>(); for (MultipartFile file : files) { String extension = FilenameUtils.getExtension(file.getOriginalFilename()); String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension; try { // assertAllowed(file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); // SFTPUtil sftp = new SFTPUtil(); // sftp.login(); // InputStream is = file.getInputStream(); // sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is); // sftp.logout(); // // urls.add(url + "/idcard/" + name); // fileNames.add(name); // newFileNames.add(FileUtils.getName(name)); // originalFilenames.add(file.getOriginalFilename()); System.out.println("上传文件路径"+filePath); List<String> urls = new ArrayList<String>(); List<String> fileNames = new ArrayList<String>(); List<String> newFileNames = new ArrayList<String>(); List<String> originalFilenames = new ArrayList<String>(); for (MultipartFile file : files) { // 上传并返回新文件名称 String fileName = FileUploadUtils.upload(filePath, file); String url = corsConfig.getUrl() + fileName; urls.add(url); fileNames.add(fileName); newFileNames.add(FileUtils.getName(fileName)); originalFilenames.add(file.getOriginalFilename()); } catch (Exception e) { // log.error("上传照片失败【{}】", e.getMessage()); return ResultData.error("上传文件失败"); } AjaxResult ajax = new AjaxResult(); ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER)); ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER)); ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER)); ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER)); return ResultData.success(ajax); } catch (Exception e) { return ResultData.error(e.getMessage()); } } AjaxResult ajax = new AjaxResult(); ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER)); ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER)); ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER)); ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER)); return ResultData.success(ajax); } } flower_city/src/main/java/com/dg/core/controller/ElseAccessoryController.java
@@ -4,7 +4,6 @@ import com.dg.core.ResultData; import com.dg.core.db.gen.entity.ElseAccessoryEntity; import com.dg.core.service.IElseAccessoryService; import com.dg.core.util.StringUtils; import com.dg.core.util.TableDataInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java
@@ -9,7 +9,6 @@ import com.dg.core.db.gen.entity.SysUser; import com.dg.core.service.IGuideEvolveService; import com.dg.core.service.IGuideRepairOrderService; import com.dg.core.util.StringUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; flower_city/src/main/java/com/dg/core/controller/OrganizationController.java
@@ -1,18 +1,14 @@ package com.dg.core.controller; import com.dg.core.ResultData; import com.dg.core.db.gen.entity.ClassifyAdministration; import com.dg.core.db.gen.entity.OrganizationChartEntity; import com.dg.core.service.IOrganizationChartService; import com.dg.core.util.StringUtils; import com.dg.core.util.TableDataInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.Assert; import org.springframework.web.bind.annotation.*; import java.util.List; @Api(tags = {"组织架构接口"}) flower_city/src/main/java/com/dg/core/controller/ReplyTemplateController.java
@@ -7,7 +7,6 @@ import com.dg.core.db.gen.entity.ReplyTemplateEntity; import com.dg.core.db.gen.entity.SysUser; import com.dg.core.service.IReplyTemplateService; import com.dg.core.util.StringUtils; import com.dg.core.util.TableDataInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java
@@ -2,11 +2,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.dg.core.ResultData; import com.dg.core.annotation.CurrentUser; import com.dg.core.db.gen.entity.RoleManagementEntity; import com.dg.core.db.gen.entity.SysUser; import com.dg.core.service.IRoleManagementService; import com.dg.core.util.StringUtils; import com.dg.core.util.TableDataInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; flower_city/src/main/java/com/dg/core/db/manual/mapper/util/HttpClientUtils.java
@@ -1,6 +1,5 @@ package com.dg.core.db.manual.mapper.util; import com.dg.core.util.StringUtils; import io.netty.channel.ConnectTimeoutException; import org.apache.commons.io.IOUtils; import org.apache.http.Consts; flower_city/src/main/java/com/dg/core/file/Constants.java
File was deleted flower_city/src/main/java/com/dg/core/file/FileTypeUtils.java
File was deleted flower_city/src/main/java/com/dg/core/file/FileUploadUtils.java
File was deleted flower_city/src/main/java/com/dg/core/file/FileUtils.java
File was deleted flower_city/src/main/java/com/dg/core/file/ImageUtils.java
File was deleted flower_city/src/main/java/com/dg/core/file/MimeTypeUtils.java
File was deleted flower_city/src/main/java/com/dg/core/spring/SpringUtils.java
@@ -1,6 +1,5 @@ package com.dg.core.spring; import com.dg.core.util.StringUtils; import org.springframework.aop.framework.AopContext; import org.springframework.beans.BeansException; import org.springframework.beans.factory.NoSuchBeanDefinitionException; flower_city/src/main/java/com/dg/core/util/StringUtils.java
File was deleted springcloud_k8s_panzhihuazhihuishequ/.idea/compiler.xml
@@ -7,24 +7,24 @@ <sourceOutputDir name="target/generated-sources/annotations" /> <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> <outputRelativeToContentRoot value="true" /> <module name="applets" /> <module name="service_property" /> <module name="grid_backstage" /> <module name="timejob" /> <module name="config_server" /> <module name="grid_app" /> <module name="auth" /> <module name="service_grid" /> <module name="applets" /> <module name="service_community" /> <module name="eureka_server" /> <module name="zuul" /> <module name="community_backstage" /> <module name="applets_backstage" /> <module name="shop_backstage" /> <module name="service_api" /> <module name="service_user" /> <module name="service_property" /> <module name="service_api" /> <module name="auth" /> <module name="service_partybuilding" /> <module name="grid_backstage" /> <module name="zuul" /> <module name="applets_backstage" /> <module name="community_backstage" /> <module name="shop_backstage" /> <module name="grid_app" /> <module name="common" /> <module name="config_server" /> <module name="eureka_server" /> <module name="timejob" /> </profile> </annotationProcessing> <bytecodeTargetLevel> springcloud_k8s_panzhihuazhihuishequ/.idea/encodings.xml
@@ -5,6 +5,7 @@ <file url="file://$PROJECT_DIR$/applets" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/applets/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/applets/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/applets/src/main/resources/lib" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/applets_backstage" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/applets_backstage/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/applets_backstage/src/main/resources" charset="UTF-8" /> @@ -14,6 +15,7 @@ <file url="file://$PROJECT_DIR$/auth/src/main/resources/bootstrap.yml" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/common" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/common/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/common/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/community_backstage" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/community_backstage/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/community_backstage/src/main/resources" charset="UTF-8" /> @@ -24,20 +26,34 @@ <file url="file://$PROJECT_DIR$/eureka_server/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/eureka_server/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/grid_app" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/grid_app/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/grid_app/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/grid_backstage" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/grid_backstage/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/grid_backstage/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_api" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_api/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_api/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_community" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_community/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_community/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_grid" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_grid/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_grid/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_partybuilding" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_partybuilding/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_partybuilding/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_property" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_property/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_property/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_user" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_user/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/service_user/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/shop_backstage" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/shop_backstage/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/shop_backstage/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/timejob" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/timejob/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/timejob/src/main/resources" charset="UTF-8" />