This commit is contained in:
parent
e33a7ede3b
commit
a0901114ec
|
@ -8,7 +8,6 @@ import org.springframework.cache.annotation.EnableCaching;
|
|||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
|
||||
/**
|
||||
* renren-admin
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
/**
|
||||
* 能力集中中心 接口
|
||||
*/
|
||||
|
|
|
@ -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<String> upload(@RequestParam("file") MultipartFile uploadFile,
|
||||
public Result<String> upload(@RequestParam("config") MultipartFile uploadFile,
|
||||
HttpServletRequest request) {
|
||||
logger.info("上传文件:{}", uploadFile.getOriginalFilename());
|
||||
String format = SIMPLE_DATE_FORMAT.format(new Date());
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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<String> uploadDevelopmentFile(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) {
|
||||
public Result<String> uploadDevelopmentFile(@RequestParam("config") MultipartFile uploadFile, HttpServletRequest request) {
|
||||
try {
|
||||
String s = developmentGuideService.uploadDevelopmentFile(uploadFile, request);
|
||||
return new Result<String>().ok(s);
|
||||
|
|
|
@ -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<Map<String, Object>> upload(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
public Result<Map<String, Object>> upload(@RequestParam("config") MultipartFile file) throws Exception {
|
||||
if (file.isEmpty()) {
|
||||
return new Result<Map<String, Object>>().error(ErrorCode.UPLOAD_FILE_EMPTY);
|
||||
}
|
||||
|
@ -112,7 +111,7 @@ public class SysOssController {
|
|||
|
||||
@PostMapping("tinymce/upload")
|
||||
@ApiOperation(value = "TinyMCE上传文件")
|
||||
public Map<String, String> tinymceUpload(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
public Map<String, String> tinymceUpload(@RequestParam("config") MultipartFile file) throws Exception {
|
||||
if (file.isEmpty()) {
|
||||
return MapUtil.newHashMap();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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<Map<String, Object>> dept =
|
||||
jdbcTemplate.queryForList("SELECT id,`name` FROM sys_dept");
|
||||
logger.info("上传文件:{}" , uploadFile.getOriginalFilename());
|
||||
|
|
|
@ -69,4 +69,9 @@ public class ApiGatewayServiceTest {
|
|||
System.out.println(code);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ssss(){
|
||||
System.err.println("ssssss");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue