Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-08-05 11:56:44 +08:00
commit da785822e0
5 changed files with 10 additions and 10 deletions

View File

@ -39,7 +39,7 @@ public class FileUploadController {
@ApiOperation("文件上传")
@LogOperation("文件上传")
@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "文件", paramType = "config", dataType = "config", required = true)
@ApiImplicitParam(name = "file", value = "文件", paramType = "file", dataType = "file", required = true)
})
public Result<String> upload(@RequestParam("file") MultipartFile uploadFile,
HttpServletRequest request) {

View File

@ -79,7 +79,7 @@ public class ActProcessController {
@PostMapping("deploy")
@ApiOperation("部署流程文件")
@LogOperation("部署流程文件")
@ApiImplicitParam(name = "processFile", value = "流程文件", paramType = "query", dataType= "config")
@ApiImplicitParam(name = "processFile", value = "流程文件", paramType = "query", dataType= "file")
// @RequiresPermissions("sys:process:all")
public Result deploy(@RequestParam("processFile") MultipartFile file) throws IOException {
if (file.isEmpty()) {

View File

@ -41,11 +41,11 @@ public class DevelopmentGuideController {
@ApiOperation("开发指南文件上传")
@LogOperation("开发指南文件上传")
@ApiImplicitParams({
@ApiImplicitParam(name = "config", value = "开发指南文件", paramType = "config", dataType = "config", required = true),
@ApiImplicitParam(name = "file", value = "开发指南文件", paramType = "file", dataType = "file", 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("config") MultipartFile uploadFile, HttpServletRequest request) {
public Result<String> uploadDevelopmentFile(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) {
try {
String s = developmentGuideService.uploadDevelopmentFile(uploadFile, request);
return new Result<String>().ok(s);

View File

@ -88,7 +88,7 @@ public class SysOssController {
@PostMapping("upload")
@ApiOperation(value = "上传文件")
public Result<Map<String, Object>> upload(@RequestParam("config") MultipartFile file) throws Exception {
public Result<Map<String, Object>> upload(@RequestParam("file") MultipartFile file) throws Exception {
if (file.isEmpty()) {
return new Result<Map<String, Object>>().error(ErrorCode.UPLOAD_FILE_EMPTY);
}
@ -111,7 +111,7 @@ public class SysOssController {
@PostMapping("tinymce/upload")
@ApiOperation(value = "TinyMCE上传文件")
public Map<String, String> tinymceUpload(@RequestParam("config") MultipartFile file) throws Exception {
public Map<String, String> tinymceUpload(@RequestParam("file") MultipartFile file) throws Exception {
if (file.isEmpty()) {
return MapUtil.newHashMap();
}

View File

@ -133,7 +133,7 @@ public class ResourceController {
page.getList().forEach(item -> {
item.setInfoList(resourceService.selectAttrsByResourceId(item.getId()));
if (item.getDeptId() != null) {
String deptName = sysDeptService.get(item.getDeptId()).getName();
String deptName = sysDeptService.get(item.getDeptId()) == null ? null : sysDeptService.get(item.getDeptId()).getName();
item.setDeptName(StringUtils.isNotBlank(deptName) ? deptName : "--");
}
});
@ -252,12 +252,12 @@ public class ResourceController {
@ApiOperation("导入")
@LogOperation("导入")
@ApiImplicitParams({
@ApiImplicitParam(name = "config", value = "数据文件文件", paramType = "config", dataType = "config")
@ApiImplicitParam(name = "file", value = "数据文件文件", paramType = "file", dataType = "file")
})
public Result importResource(@RequestParam("config") MultipartFile uploadFile, HttpServletRequest request) {
public Result importResource(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) {
List<Map<String, Object>> dept =
jdbcTemplate.queryForList("SELECT id,`name` FROM sys_dept");
logger.info("上传文件:{}" , uploadFile.getOriginalFilename());
logger.info("上传文件:{}", uploadFile.getOriginalFilename());
String format = sdf.format(new Date());
File folder = new File(uploadPath + "upload" + File.separator + format);
logger.info(folder.getPath());