From bd85162c5b94b47b73717f454cf3f3c88c3ccc55 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 10 十月 2022 12:21:33 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/controller/sys/BlacklistController.java | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/lf/server/controller/sys/BlacklistController.java b/src/main/java/com/lf/server/controller/sys/BlacklistController.java index 78b87da..fe63079 100644 --- a/src/main/java/com/lf/server/controller/sys/BlacklistController.java +++ b/src/main/java/com/lf/server/controller/sys/BlacklistController.java @@ -28,12 +28,13 @@ @SysLog() @ApiOperation(value = "鏌ヨ璁板綍鏁�") @ApiImplicitParams({ - @ApiImplicitParam(name = "ip", value = "IP鍦板潃", dataType = "String", paramType = "query", required = false, example = "") + @ApiImplicitParam(name = "ip", value = "IP鍦板潃", dataType = "String", paramType = "query", required = false, example = "192."), + @ApiImplicitParam(name = "type", value = "绫诲埆", dataType = "Integer", paramType = "query", example = "1") }) @GetMapping({"/selectCount"}) - public ResponseMsg<Integer> selectCount(String ip) { + public ResponseMsg<Integer> selectCount(String ip, Integer type) { try { - int count = blacklistService.selectCount(ip); + int count = blacklistService.selectCount(ip, type); return success(count); } catch (Exception ex) { @@ -44,18 +45,19 @@ @SysLog() @ApiOperation(value = "鍒嗛〉鏌ヨ") @ApiImplicitParams({ - @ApiImplicitParam(name = "ip", value = "IP鍦板潃", dataType = "String", paramType = "query", example = ""), + @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") }) @GetMapping(value = "/selectByPage") - public ResponseMsg<List<BlacklistEntity>> selectByPage(String ip, Integer pageSize, Integer pageIndex) { + public ResponseMsg<List<BlacklistEntity>> selectByPage(String ip, Integer type, Integer pageSize, Integer pageIndex) { try { if (pageSize < 1 || pageIndex < 1) { return fail("姣忛〉椤垫暟鎴栧垎椤垫暟灏忎簬1", null); } - List<BlacklistEntity> rs = blacklistService.selectByPage(ip, pageSize, pageSize * (pageIndex - 1)); + List<BlacklistEntity> rs = blacklistService.selectByPage(ip, type, pageSize, pageSize * (pageIndex - 1)); return success(rs); } catch (Exception ex) { @@ -66,21 +68,22 @@ @SysLog() @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") @ApiImplicitParams({ - @ApiImplicitParam(name = "ip", value = "IP鍦板潃", dataType = "String", paramType = "query", example = ""), + @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") }) @GetMapping(value = "/selectByPageAndCount") - public ResponseMsg<List<BlacklistEntity>> selectByPageAndCount(String ip, Integer pageSize, Integer pageIndex) { + public ResponseMsg<List<BlacklistEntity>> selectByPageAndCount(String ip, Integer type, Integer pageSize, Integer pageIndex) { try { if (pageSize < 1 || pageIndex < 1) { return fail("姣忛〉椤垫暟鎴栧垎椤垫暟灏忎簬1", null); } - int count = blacklistService.selectCount(ip); + int count = blacklistService.selectCount(ip, type); if (count == 0) { return success(0, null); } - List<BlacklistEntity> rs = blacklistService.selectByPage(ip, pageSize, pageSize * (pageIndex - 1)); + List<BlacklistEntity> rs = blacklistService.selectByPage(ip, type, pageSize, pageSize * (pageIndex - 1)); return success(count, rs); } catch (Exception ex) { -- Gitblit v1.9.3