diff --git a/renren-admin/src/main/java/io/renren/AdminApplication.java b/renren-admin/src/main/java/io/renren/AdminApplication.java index d19483d5..58c996af 100644 --- a/renren-admin/src/main/java/io/renren/AdminApplication.java +++ b/renren-admin/src/main/java/io/renren/AdminApplication.java @@ -8,7 +8,6 @@ import org.springframework.cache.annotation.EnableCaching; import org.springframework.scheduling.annotation.EnableScheduling; import springfox.documentation.swagger2.annotations.EnableSwagger2; - /** * renren-admin * diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java index f838ccd6..d8d04e0c 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterController.java @@ -1,6 +1,5 @@ package io.renren.common.controller; - import cn.hutool.core.util.ObjectUtil; import io.renren.common.annotation.LogOperation; import io.renren.common.page.PageData; @@ -35,7 +34,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.stream.Collectors; - /** * 能力集中中心 接口 */ diff --git a/renren-admin/src/main/java/io/renren/common/controller/FileUploadController.java b/renren-admin/src/main/java/io/renren/common/controller/FileUploadController.java index 035a05dd..c3409f4a 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/FileUploadController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/FileUploadController.java @@ -39,9 +39,9 @@ public class FileUploadController { @ApiOperation("文件上传") @LogOperation("文件上传") @ApiImplicitParams({ - @ApiImplicitParam(name = "file", value = "文件", paramType = "file", dataType = "file", required = true) + @ApiImplicitParam(name = "config", value = "文件", paramType = "config", dataType = "config", required = true) }) - public Result upload(@RequestParam("file") MultipartFile uploadFile, + public Result upload(@RequestParam("config") MultipartFile uploadFile, HttpServletRequest request) { logger.info("上传文件:{}", uploadFile.getOriginalFilename()); String format = SIMPLE_DATE_FORMAT.format(new Date()); diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActProcessController.java b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActProcessController.java index 531b66db..845bc6d0 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActProcessController.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActProcessController.java @@ -79,7 +79,7 @@ public class ActProcessController { @PostMapping("deploy") @ApiOperation("部署流程文件") @LogOperation("部署流程文件") - @ApiImplicitParam(name = "processFile", value = "流程文件", paramType = "query", dataType="file") + @ApiImplicitParam(name = "processFile", value = "流程文件", paramType = "query", dataType= "config") // @RequiresPermissions("sys:process:all") public Result deploy(@RequestParam("processFile") MultipartFile file) throws IOException { if (file.isEmpty()) { diff --git a/renren-admin/src/main/java/io/renren/modules/demo/controller/ExcelDataController.java b/renren-admin/src/main/java/io/renren/modules/demo/controller/ExcelDataController.java index 28c1d86b..28679aab 100644 --- a/renren-admin/src/main/java/io/renren/modules/demo/controller/ExcelDataController.java +++ b/renren-admin/src/main/java/io/renren/modules/demo/controller/ExcelDataController.java @@ -18,7 +18,6 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -104,8 +103,8 @@ public class ExcelDataController { @PostMapping("import") @ApiOperation("导入") // @RequiresPermissions("demo:excel:all") - @ApiImplicitParam(name = "file", value = "文件", paramType = "query", dataType="file") - public Result importExcel(@RequestParam("file") MultipartFile file) throws Exception { + @ApiImplicitParam(name = "config", value = "文件", paramType = "query", dataType= "config") + public Result importExcel(@RequestParam("config") MultipartFile file) throws Exception { //解析并保存到数据库 EasyExcel.read(file.getInputStream(), ExcelDataExcel.class, new ExcelDataListener<>(excelDataService)).sheet().doRead(); diff --git a/renren-admin/src/main/java/io/renren/modules/developmentGuide/controller/DevelopmentGuideController.java b/renren-admin/src/main/java/io/renren/modules/developmentGuide/controller/DevelopmentGuideController.java index fce1b095..2c2ad218 100644 --- a/renren-admin/src/main/java/io/renren/modules/developmentGuide/controller/DevelopmentGuideController.java +++ b/renren-admin/src/main/java/io/renren/modules/developmentGuide/controller/DevelopmentGuideController.java @@ -41,11 +41,11 @@ public class DevelopmentGuideController { @ApiOperation("开发指南文件上传") @LogOperation("开发指南文件上传") @ApiImplicitParams({ - @ApiImplicitParam(name = "file", value = "开发指南文件", paramType = "file", dataType = "file", required = true), + @ApiImplicitParam(name = "config", value = "开发指南文件", paramType = "config", dataType = "config", required = true), @ApiImplicitParam(name = "fileName", value = "文件名称", paramType = "query", dataType = "String", required = true), @ApiImplicitParam(name = "type", value = "能力类型", paramType = "query", dataType = "String", required = true), }) - public Result uploadDevelopmentFile(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) { + public Result uploadDevelopmentFile(@RequestParam("config") MultipartFile uploadFile, HttpServletRequest request) { try { String s = developmentGuideService.uploadDevelopmentFile(uploadFile, request); return new Result().ok(s); diff --git a/renren-admin/src/main/java/io/renren/modules/oss/controller/SysOssController.java b/renren-admin/src/main/java/io/renren/modules/oss/controller/SysOssController.java index ec800279..96f6bf03 100644 --- a/renren-admin/src/main/java/io/renren/modules/oss/controller/SysOssController.java +++ b/renren-admin/src/main/java/io/renren/modules/oss/controller/SysOssController.java @@ -19,7 +19,6 @@ import io.renren.modules.sys.service.SysParamsService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.io.FilenameUtils; -import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -89,7 +88,7 @@ public class SysOssController { @PostMapping("upload") @ApiOperation(value = "上传文件") - public Result> upload(@RequestParam("file") MultipartFile file) throws Exception { + public Result> upload(@RequestParam("config") MultipartFile file) throws Exception { if (file.isEmpty()) { return new Result>().error(ErrorCode.UPLOAD_FILE_EMPTY); } @@ -112,7 +111,7 @@ public class SysOssController { @PostMapping("tinymce/upload") @ApiOperation(value = "TinyMCE上传文件") - public Map tinymceUpload(@RequestParam("file") MultipartFile file) throws Exception { + public Map tinymceUpload(@RequestParam("config") MultipartFile file) throws Exception { if (file.isEmpty()) { return MapUtil.newHashMap(); } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java index a7cba492..89b4ef8f 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/CorrectionListener.java @@ -168,7 +168,7 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti ResourceDTO resourceEntityDto = null; Long deptId = null; if (abilityApplicationDTO != null) { - logger.error("abilityApplicationDTO:{}", abilityApplicationDTO.toString()); + logger.error("abilityApplicationDTO:{}", abilityApplicationDTO); resourceEntityDto = resourceService.get(Long.valueOf(abilityApplicationDTO.getResourceId())); } if (resourceEntityDto != null && resourceEntityDto.getDeptId() != null) { @@ -200,11 +200,11 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti userDTO = sysUserService.getByDeptIdAndRoleId(deptId, roleDTO.getId()); // 搜出审批人 } if (userDTO != null) { - logger.error("审批人id:" + userDTO.getId()); + logger.error("审批人id:{}", userDTO.getId()); taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString()); assignee = userDTO.getId().toString(); } else { - logger.error("未查到该部门对应的 " + roleName); + logger.error("未查到该部门对应的 {}", roleName); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); assignee = defaultAssigneeRoleId; } diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index b6ba5bea..fb500b62 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -252,9 +252,9 @@ public class ResourceController { @ApiOperation("导入") @LogOperation("导入") @ApiImplicitParams({ - @ApiImplicitParam(name = "file", value = "数据文件文件", paramType = "file", dataType = "file") + @ApiImplicitParam(name = "config", value = "数据文件文件", paramType = "config", dataType = "config") }) - public Result importResource(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) { + public Result importResource(@RequestParam("config") MultipartFile uploadFile, HttpServletRequest request) { List> dept = jdbcTemplate.queryForList("SELECT id,`name` FROM sys_dept"); logger.info("上传文件:{}" , uploadFile.getOriginalFilename()); diff --git a/renren-admin/src/test/java/io/renren/ApiGatewayServiceTest.java b/renren-admin/src/test/java/io/renren/ApiGatewayServiceTest.java index cb98e6f8..d4891e6c 100644 --- a/renren-admin/src/test/java/io/renren/ApiGatewayServiceTest.java +++ b/renren-admin/src/test/java/io/renren/ApiGatewayServiceTest.java @@ -69,4 +69,9 @@ public class ApiGatewayServiceTest { System.out.println(code); } + @Test + public void ssss(){ + System.err.println("ssssss"); + } + } \ No newline at end of file