管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-11 24776e7ffb4815202fbe0035da4198103469e706
src/main/java/com/lf/server/controller/sys/RoleController.java
@@ -29,12 +29,13 @@
    @SysLog()
    @ApiOperation(value = "查询记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", required = false, example = "sys_role")
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", required = false, example = "sys_role"),
            @ApiImplicitParam(name = "depName", value = "名称", dataType = "String", paramType = "query", example = "sys_role")
    })
    @GetMapping({"/selectCount"})
    public ResponseMsg<Integer> selectCount(String name) {
    public ResponseMsg<Integer> selectCount(String name, String depName) {
        try {
            int count = roleService.selectCount(name);
            int count = roleService.selectCount(name, depName);
            return success(count);
        } catch (Exception ex) {
@@ -78,7 +79,7 @@
                return fail("每页页数或分页数小于1", null);
            }
            int count = roleService.selectCount(name);
            int count = roleService.selectCount(name, depName);
            if (count == 0) {
                return success(0, null);
            }
@@ -92,7 +93,7 @@
    }
    @SysLog()
    @ApiOperation(value = "插入字典")
    @ApiOperation(value = "插入一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleEntity", value = "字典实体类", dataType = "com.lf.server.entity.sys.RoleEntity", paramType = "body", example = "")
    })
@@ -108,9 +109,9 @@
    }
    @SysLog()
    @ApiOperation(value = "插入多条字典")
    @ApiOperation(value = "插入多条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleEntity", value = "字典实体类集合", dataType = "List<RoleEntity>", paramType = "body", example = "")
            @ApiImplicitParam(name = "roleEntity", value = "实体类集合", dataType = "List<RoleEntity>", paramType = "body", example = "")
    })
    @PostMapping(value = "/insertRoles", produces = "application/json; charset=UTF-8")
    public ResponseMsg<Integer> insertRoles(@RequestBody List<RoleEntity> roleEntity) {
@@ -124,9 +125,9 @@
    }
    @SysLog()
    @ApiOperation(value = "删除一条字典")
    @ApiOperation(value = "删除一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "字典ID", dataType = "Integer", paramType = "query", example = "1")
            @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/deleteRole")
    public ResponseMsg<Integer> deleteRole(int id) {
@@ -140,9 +141,9 @@
    }
    @SysLog()
    @ApiOperation(value = "删除多条字典")
    @ApiOperation(value = "删除多条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ids", value = "字典ID集合", dataType = "List<Integer>", paramType = "query", example = "1,2")
            @ApiImplicitParam(name = "ids", value = "ID集合", dataType = "List<Integer>", paramType = "query", example = "1,2")
    })
    @GetMapping(value = "/deleteAuths")
    public ResponseMsg<Integer> deleteRoles(@RequestParam List<Integer> ids) {
@@ -158,9 +159,9 @@
    }
    @SysLog()
    @ApiOperation(value = "更新一条字典")
    @ApiOperation(value = "更新一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleEntity", value = "字典ID集合", dataType = "RoleEntity", paramType = "body", example = "")
            @ApiImplicitParam(name = "roleEntity", value = "ID集合", dataType = "RoleEntity", paramType = "body", example = "")
    })
    @ResponseBody
    @PostMapping(value = "/updateRole", produces = "application/json; charset=UTF-8")
@@ -175,9 +176,9 @@
    }
    @SysLog()
    @ApiOperation(value = "根据ID查询字典")
    @ApiOperation(value = "根据ID查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "字典ID", dataType = "Integer", paramType = "query", example = "1")
            @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/selectRole")
    public ResponseMsg<RoleEntity> selectRole(int id) {
@@ -191,7 +192,7 @@
    }
    @SysLog()
    @ApiOperation(value = "查询所有字典")
    @ApiOperation(value = "查询所有")
    @GetMapping(value = "/selectRoleAll")
    public ResponseMsg<List<RoleEntity>> selectRoleAll() {
        try {