13693261870
8 天以前 b8d62de41ff7e1e0549061308aa11f68cf881ed9
se-system/src/main/java/com/terra/system/controller/data/DictController.java
@@ -8,12 +8,13 @@
import com.terra.system.entity.sys.UserEntity;
import com.terra.system.service.data.DictService;
import com.terra.system.service.sys.TokenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import javax.annotation.Resource;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@@ -22,7 +23,7 @@
 * 字典管理
 * @author WWW
 */
@Api(tags = "数据管理\\字典管理")
@Tag(name = "数据管理\\字典管理")
@RestController
@RequestMapping("/dict")
public class DictController extends BaseController {
@@ -33,10 +34,10 @@
    TokenService tokenService;
    @SysLog()
    @ApiOperation(value = "查询记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ns", value = "表空间", dataType = "String", paramType = "query", required = false, example = "bd"),
            @ApiImplicitParam(name = "tab", value = "表名", dataType = "String", paramType = "query", example = "dlg_25w_hyda")
    @Operation(summary = "查询记录数")
    @Parameters({
            @Parameter(name = "ns", description = "表空间", in = ParameterIn.QUERY, required = false, example = "bd"),
            @Parameter(name = "tab", description = "表名", in = ParameterIn.QUERY, example = "dlg_25w_hyda")
    })
    @GetMapping({"/selectCount"})
    public ResponseMsg<Integer> selectCount(String ns, String tab) {
@@ -50,12 +51,12 @@
    }
    @SysLog()
    @ApiOperation(value = "分页查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ns", value = "表空间", dataType = "String", paramType = "query", example = "bd"),
            @ApiImplicitParam(name = "tab", value = "表名", dataType = "String", paramType = "query", example = "dlg_25w_hyda"),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"),
            @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1")
    @Operation(summary = "分页查询")
    @Parameters({
            @Parameter(name = "ns", description = "表空间", in = ParameterIn.QUERY, example = "bd"),
            @Parameter(name = "tab", description = "表名", in = ParameterIn.QUERY, example = "dlg_25w_hyda"),
            @Parameter(name = "pageSize", description = "每页条数", in = ParameterIn.QUERY, example = "10"),
            @Parameter(name = "pageIndex", description = "分页数(从1开始)", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/selectByPage")
    public ResponseMsg<List<DictEntity>> selectByPage(String ns, String tab, Integer pageSize, Integer pageIndex) {
@@ -73,12 +74,12 @@
    }
    @SysLog()
    @ApiOperation(value = "分页查询并返回记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ns", value = "表空间", dataType = "String", paramType = "query", example = "bd"),
            @ApiImplicitParam(name = "tab", value = "表名", dataType = "String", paramType = "query", example = "dlg_25w_hyda"),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"),
            @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1")
    @Operation(summary = "分页查询并返回记录数")
    @Parameters({
            @Parameter(name = "ns", description = "表空间", in = ParameterIn.QUERY, example = "bd"),
            @Parameter(name = "tab", description = "表名", in = ParameterIn.QUERY, example = "dlg_25w_hyda"),
            @Parameter(name = "pageSize", description = "每页条数", in = ParameterIn.QUERY, example = "10"),
            @Parameter(name = "pageIndex", description = "分页数(从1开始)", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/selectByPageAndCount")
    public ResponseMsg<List<DictEntity>> selectByPageAndCount(String ns, String tab, Integer pageSize, Integer pageIndex) {
@@ -101,9 +102,9 @@
    }
    @SysLog()
    @ApiOperation(value = "根据ID查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "ID", dataType = "int", paramType = "query", example = "1")
    @Operation(summary = "根据ID查询")
    @Parameters({
            @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/selectById")
    public ResponseMsg<DictEntity> selectById(int id) {
@@ -117,10 +118,10 @@
    }
    @SysLog()
    @ApiOperation(value = "查询字典表结构")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = "点"),
            @ApiImplicitParam(name = "hasGeom", value = "含有Geom字段", dataType = "Boolean", paramType = "query", example = "false")
    @Operation(summary = "查询字典表结构")
    @Parameters({
            @Parameter(name = "name", description = "名称", in = ParameterIn.QUERY, example = "点"),
            @Parameter(name = "hasGeom", description = "含有Geom字段", in = ParameterIn.QUERY, example = "false")
    })
    @GetMapping(value = "/selectDictTab")
    public ResponseMsg<List<TabEntity>> selectDictTab(String name, Boolean hasGeom) {
@@ -134,9 +135,9 @@
    }
    @SysLog()
    @ApiOperation(value = "插入一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "DictEntity", paramType = "body")
    @Operation(summary = "插入一条")
    @Parameters({
            @Parameter(name = "entity", description = "实体类")
    })
    @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8")
    public ResponseMsg<Integer> insert(@RequestBody DictEntity entity, HttpServletRequest req) {
@@ -155,9 +156,9 @@
    }
    @SysLog()
    @ApiOperation(value = "插入多条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "DictEntity", paramType = "body")
    @Operation(summary = "插入多条")
    @Parameters({
            @Parameter(name = "list", description = "实体类集合")
    })
    @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8")
    public ResponseMsg<Integer> inserts(@RequestBody List<DictEntity> list, HttpServletRequest req) {
@@ -178,9 +179,9 @@
    }
    @SysLog()
    @ApiOperation(value = "删除一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1")
    @Operation(summary = "删除一条")
    @Parameters({
            @Parameter(name = "id", description = "ID", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping(value = "/delete")
    public ResponseMsg<Integer> delete(int id) {
@@ -194,9 +195,9 @@
    }
    @SysLog()
    @ApiOperation(value = "删除多条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "Integer", paramType = "query", example = "1,2")
    @Operation(summary = "删除多条")
    @Parameters({
            @Parameter(name = "ids", description = "ID数组", in = ParameterIn.QUERY, example = "1,2")
    })
    @GetMapping(value = "/deletes")
    public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) {
@@ -214,9 +215,9 @@
    }
    @SysLog()
    @ApiOperation(value = "更新一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "DictEntity", paramType = "body")
    @Operation(summary = "更新一条")
    @Parameters({
            @Parameter(name = "entity", description = "实体类")
    })
    @ResponseBody
    @PostMapping(value = "/update", produces = "application/json; charset=UTF-8")
@@ -236,9 +237,9 @@
    }
    @SysLog()
    @ApiOperation(value = "更新多条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "DictEntity", paramType = "body")
    @Operation(summary = "更新多条")
    @Parameters({
            @Parameter(name = "list", description = "实体类集合")
    })
    @ResponseBody
    @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8")