|
@@ -4,6 +4,7 @@ import cn.hutool.core.util.NumberUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.jiayue.ssi.annotation.OperateLog;
|
|
import com.jiayue.ssi.annotation.OperateLog;
|
|
|
|
+import com.jiayue.ssi.annotation.PreventReplay;
|
|
import com.jiayue.ssi.backenum.AuditType;
|
|
import com.jiayue.ssi.backenum.AuditType;
|
|
import com.jiayue.ssi.backenum.BusinessType;
|
|
import com.jiayue.ssi.backenum.BusinessType;
|
|
import com.jiayue.ssi.constant.CacheConstants;
|
|
import com.jiayue.ssi.constant.CacheConstants;
|
|
@@ -39,6 +40,7 @@ public class IpBlacklistController {
|
|
*/
|
|
*/
|
|
@GetMapping(value = "/getAll")
|
|
@GetMapping(value = "/getAll")
|
|
@PreAuthorize("@ss.hasPermi('system:ipblacklist:list')")
|
|
@PreAuthorize("@ss.hasPermi('system:ipblacklist:list')")
|
|
|
|
+ @PreventReplay
|
|
public ResponseVO getAll(String currentPage, String pageSize, String ip) throws CustomException {
|
|
public ResponseVO getAll(String currentPage, String pageSize, String ip) throws CustomException {
|
|
try {
|
|
try {
|
|
Integer cp;
|
|
Integer cp;
|
|
@@ -87,6 +89,7 @@ public class IpBlacklistController {
|
|
@PostMapping(value = "/addIp")
|
|
@PostMapping(value = "/addIp")
|
|
@OperateLog(title = "黑名单管理", businessType = BusinessType.INSERT, auditType = AuditType.SYS)
|
|
@OperateLog(title = "黑名单管理", businessType = BusinessType.INSERT, auditType = AuditType.SYS)
|
|
@PreAuthorize("@ss.hasPermi('system:ipblacklist:add')")
|
|
@PreAuthorize("@ss.hasPermi('system:ipblacklist:add')")
|
|
|
|
+ @PreventReplay
|
|
public ResponseVO addIp(String ip) throws CustomException {
|
|
public ResponseVO addIp(String ip) throws CustomException {
|
|
try {
|
|
try {
|
|
if (!IPUtils.isIP(ip)) {
|
|
if (!IPUtils.isIP(ip)) {
|
|
@@ -115,6 +118,7 @@ public class IpBlacklistController {
|
|
@PostMapping(value = "/delIp")
|
|
@PostMapping(value = "/delIp")
|
|
@OperateLog(title = "黑名单管理", businessType = BusinessType.DELETE, auditType = AuditType.SYS)
|
|
@OperateLog(title = "黑名单管理", businessType = BusinessType.DELETE, auditType = AuditType.SYS)
|
|
@PreAuthorize("@ss.hasPermi('system:ipblacklist:remove')")
|
|
@PreAuthorize("@ss.hasPermi('system:ipblacklist:remove')")
|
|
|
|
+ @PreventReplay
|
|
public ResponseVO delIp(String id) throws CustomException {
|
|
public ResponseVO delIp(String id) throws CustomException {
|
|
try {
|
|
try {
|
|
if (StringUtils.isEmpty(id)) {
|
|
if (StringUtils.isEmpty(id)) {
|