文档
This commit is contained in:
@ -7,6 +7,8 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.framework.config.ServerConfig;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -27,6 +29,7 @@ import java.util.Map;
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Api(value = "通用控制器", tags = {"通用接口"})
|
||||
@RestController
|
||||
public class CommonController
|
||||
{
|
||||
@ -42,6 +45,7 @@ public class CommonController
|
||||
* @param delete 是否删除
|
||||
*/
|
||||
@GetMapping("common/download")
|
||||
@ApiOperation("通用下载请求")
|
||||
public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
try
|
||||
@ -71,6 +75,7 @@ public class CommonController
|
||||
* 通用上传请求
|
||||
*/
|
||||
@PostMapping("/common/upload")
|
||||
@ApiOperation("通用上传请求")
|
||||
public AjaxResult uploadFile(MultipartFile file) throws Exception
|
||||
{
|
||||
try
|
||||
@ -95,6 +100,7 @@ public class CommonController
|
||||
* 本地资源通用下载
|
||||
*/
|
||||
@GetMapping("/common/download/resource")
|
||||
@ApiOperation("本地资源通用下载")
|
||||
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
|
||||
throws Exception
|
||||
{
|
||||
|
Reference in New Issue
Block a user