13693261870
昨天 32eb942e25aa366563b7f40b05a382c0c462213c
se-system/src/main/java/com/terra/system/controller/sys/BlacklistController.java
@@ -1,18 +1,19 @@
package com.terra.system.controller.sys;
import com.terra.system.annotation.SysLog;
import com.terra.system.controller.all.BaseController;
import com.terra.system.entity.all.ResponseMsg;
import com.terra.common.annotation.SysLog;
import com.terra.common.controller.all.BaseController;
import com.terra.common.entity.all.ResponseMsg;
import com.terra.system.entity.sys.BlacklistEntity;
import com.terra.system.entity.sys.UserEntity;
import com.terra.system.service.sys.BlacklistService;
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;
@@ -21,7 +22,7 @@
 * 黑名单
 * @author WWW
 */
@Api(tags = "运维管理\\黑名单")
@Tag(name = "运维管理\\黑名单")
@RestController
@RequestMapping("/blacklist")
public class BlacklistController extends BaseController {
@@ -32,10 +33,10 @@
    TokenService tokenService;
    @SysLog()
    @ApiOperation(value = "查询记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ip", value = "IP地址", dataType = "String", paramType = "query", required = false, example = "192."),
            @ApiImplicitParam(name = "type", value = "类别", dataType = "Integer", paramType = "query", example = "1")
    @Operation(summary = "查询记录数")
    @Parameters({
            @Parameter(name = "ip", description = "IP地址", in = ParameterIn.QUERY, required = false, example = "192."),
            @Parameter(name = "type", description = "类别", in = ParameterIn.QUERY, example = "1")
    })
    @GetMapping({"/selectCount"})
    public ResponseMsg<Integer> selectCount(String ip, Integer type) {
@@ -49,12 +50,12 @@
    }
    @SysLog()
    @ApiOperation(value = "分页查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ip", value = "IP地址", dataType = "String", paramType = "query", example = "192."),
            @ApiImplicitParam(name = "type", value = "类别", dataType = "Integer", paramType = "query", example = "1"),
            @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 = "ip", description = "IP地址", in = ParameterIn.QUERY, example = "192."),
            @Parameter(name = "type", description = "类别", in = ParameterIn.QUERY, example = "1"),
            @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<BlacklistEntity>> selectByPage(String ip, Integer type, Integer pageSize, Integer pageIndex) {
@@ -72,12 +73,12 @@
    }
    @SysLog()
    @ApiOperation(value = "分页查询并返回记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ip", value = "IP地址", dataType = "String", paramType = "query", required = false, example = "192."),
            @ApiImplicitParam(name = "type", value = "类别", dataType = "Integer", paramType = "query", example = "1"),
            @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 = "ip", description = "IP地址", in = ParameterIn.QUERY, required = false, example = "192."),
            @Parameter(name = "type", description = "类别", in = ParameterIn.QUERY, example = "1"),
            @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<BlacklistEntity>> selectByPageAndCount(String ip, Integer type, Integer pageSize, Integer pageIndex) {
@@ -98,7 +99,7 @@
    }
    @SysLog()
    @ApiOperation(value = "查询所有")
    @Operation(summary = "查询所有")
    @GetMapping(value = "/selectAll")
    public ResponseMsg<List<BlacklistEntity>> selectAll() {
        try {
@@ -111,9 +112,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<BlacklistEntity> selectById(int id) {
@@ -127,9 +128,9 @@
    }
    @SysLog()
    @ApiOperation(value = "插入一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "BlacklistEntity", paramType = "body")
    @Operation(summary = "插入一条")
    @Parameters({
            @Parameter(name = "entity", description = "实体类")
    })
    @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8")
    public ResponseMsg<Integer> insert(@RequestBody BlacklistEntity entity, HttpServletRequest req) {
@@ -148,9 +149,9 @@
    }
    @SysLog()
    @ApiOperation(value = "插入多条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "BlacklistEntity", paramType = "body")
    @Operation(summary = "插入多条")
    @Parameters({
            @Parameter(name = "list", description = "实体类集合")
    })
    @PostMapping(value = "/inserts", produces = "application/json; charset=UTF-8")
    public ResponseMsg<Integer> inserts(@RequestBody List<BlacklistEntity> list, HttpServletRequest req) {
@@ -171,9 +172,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) {
@@ -187,9 +188,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) {
@@ -207,9 +208,9 @@
    }
    @SysLog()
    @ApiOperation(value = "更新一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "BlacklistEntity", paramType = "body")
    @Operation(summary = "更新一条")
    @Parameters({
            @Parameter(name = "entity", description = "实体类")
    })
    @ResponseBody
    @PostMapping(value = "/update", produces = "application/json; charset=UTF-8")
@@ -229,9 +230,9 @@
    }
    @SysLog()
    @ApiOperation(value = "更新多条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "BlacklistEntity", paramType = "body")
    @Operation(summary = "更新多条")
    @Parameters({
            @Parameter(name = "list", description = "实体类集合")
    })
    @ResponseBody
    @PostMapping(value = "/updates", produces = "application/json; charset=UTF-8")