管道基础大数据平台系统开发-【后端】-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";
@@ -110,8 +110,8 @@
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"),
            @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/selectCountForRole")
    public ResponseMsg<List<ResEntity>> selectCountForRole(Integer roleid, Integer pageSize, Integer pageIndex) {
    @GetMapping(value = "/selectByPageForRole")
    public ResponseMsg<List<ResEntity>> selectByPageForRole(Integer roleid, Integer pageSize, Integer pageIndex) {
        try {
            if (pageSize < 1 || pageIndex < 1) {
                return fail("每页页数或分页数小于1", null);
@@ -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);
    }
}