管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-19 b1f4fd76dbc3eaafe9296fe35b28b4e65510e367
src/main/java/com/lf/server/controller/sys/ResController.java
@@ -5,7 +5,7 @@
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.sys.ResEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.service.all.FileService;
import com.lf.server.service.data.UploaderService;
import com.lf.server.service.sys.ResService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.Api;
@@ -36,7 +36,7 @@
    TokenService tokenService;
    @Autowired
    FileService fileService;
    UploaderService uploaderService;
    private final static String TAB_NAME = "sys_res";
@@ -266,7 +266,7 @@
    public ResponseMsg<String> upload(@RequestParam("file") MultipartFile file, HttpServletRequest req) {
        UserEntity ue = tokenService.getCurrentUser(req);
        return fileService.upload(ue, TAB_NAME, file, this);
        return uploaderService.upload(ue, TAB_NAME, file, this);
    }
    @SysLog()
@@ -275,7 +275,7 @@
            @ApiImplicitParam(name = "guid", value = "附件Guid", dataType = "String", paramType = "body")
    })
    @GetMapping(value = "/download")
    public void download(String guid, HttpServletRequest req, HttpServletResponse res) {
        fileService.download(guid, req, res, this);
    public void download(String guid, HttpServletResponse res) {
        uploaderService.download(guid, res);
    }
}