kongzy
2024-03-15 50c669c09a7b392af22706e6fb1fa8a4c335d8eb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.gkhy.assess.admin.controller.app;
 
import com.gkhy.assess.common.api.CommonResult;
import com.gkhy.assess.system.domain.vo.UploadObjectVO;
import com.gkhy.assess.system.service.SysCommonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
@Api(tags = "APP通用接口前端控制器")
@RestController
@RequestMapping("/app/system/common")
public class AppCommonController {
    @Autowired
    private SysCommonService commonService;
 
    @ApiOperation(value = "上传图片/文件")
    @PostMapping("/uploadFile")
    public CommonResult<UploadObjectVO> uploadFile(MultipartFile file){
        return CommonResult.success(commonService.uploadFile(file));
    }
 
 
    @ApiOperation(value = "删除图片")
    @DeleteMapping("/removeFile")
    public CommonResult removeFile(@RequestParam(required = true) String path){
        return CommonResult.success(commonService.removeFile(path));
    }
 
}