管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-09-26 b8712ac91f36e0d4a15ea3a623342af5368c898c
1
已修改1个文件
16 ■■■■■ 文件已修改
src/main/java/com/lf/server/controller/data/DictController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/data/DictController.java
@@ -3,6 +3,10 @@
import com.lf.server.entity.data.DictEntity;
import com.lf.server.service.data.DictService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -13,18 +17,28 @@
 * @author sws
 * @date 2022-09.26
 */
@Api(tags = "DictController", description = "字典管理")
@RestController
@RequestMapping("/Dict")
public class DictController {
    @Autowired
    DictService dictService;
    @ApiOperation(value = "查询记录数", notes = "查询记录数")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "tab", value = "表名", dataType = "String", paramType = "query", required = false, example = "sys_dict")
    })
    @GetMapping({"/selectCount"})
    public Integer selectCount(String tab) {
        return dictService.selectCount(tab);
    }
    @ApiOperation(value = "分页查询", notes = "分页查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "tab", value = "表名", dataType = "String", paramType = "query", required = false, example = "sys_dict"),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"),
            @ApiImplicitParam(name = "pageIndex", value = "分页索引(从0开始)", dataType = "Integer", paramType = "query", example = "0")
    })
    @GetMapping(value = "/selectByPage")
    public List<DictEntity> selectByPage(String tab, Integer pageSize, Integer pageIndex) {
        if (pageSize < 1 || pageIndex < 0) {