管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-19 b1f4fd76dbc3eaafe9296fe35b28b4e65510e367
src/main/java/com/lf/server/controller/data/StyleController.java
@@ -5,7 +5,7 @@
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.data.StyleEntity;
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.data.StyleService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.Api;
@@ -36,14 +36,14 @@
    TokenService tokenService;
    @Autowired
    FileService fileService;
    UploaderService uploaderService;
    private final static String TAB_NAME = "sys_style";
    @SysLog()
    @ApiOperation(value = "查询记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", required = false, example = "sys_style")
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", required = false, example = "a")
    })
    @GetMapping({"/selectCount"})
    public ResponseMsg<Integer> selectCount(String name) {
@@ -59,9 +59,9 @@
    @SysLog()
    @ApiOperation(value = "分页查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", required = false, example = "sys_style"),
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", required = false, example = "a"),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"),
            @ApiImplicitParam(name = "pageIndex", value = "分页索引(从0开始)", dataType = "Integer", paramType = "query", example = "1")
            @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/selectByPage")
    public ResponseMsg<List<StyleEntity>> selectByPage(String name, Integer pageSize, Integer pageIndex) {
@@ -82,9 +82,9 @@
    @SysLog()
    @ApiOperation(value = "分页查询并返回记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = "sys_style"),
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = "a"),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"),
            @ApiImplicitParam(name = "pageIndex", value = "分页索引(从0开始)", dataType = "Integer", paramType = "query", example = "0")
            @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/selectByPageAndCount")
    public ResponseMsg<List<StyleEntity>> selectByPageAndCount(String name, Integer pageSize, Integer pageIndex) {
@@ -244,7 +244,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()
@@ -253,7 +253,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);
    }
}