From 5ac56c82c48200f5bfd82917d04279ff502a906f Mon Sep 17 00:00:00 2001
From: tj <1378534974@qq.com>
Date: 星期四, 20 三月 2025 15:06:20 +0800
Subject: [PATCH] 高级安全防护
---
src/main/java/com/jsh/erp/controller/ConfigSecurityController.java | 36 +++++++++++++++++++++++++++++-------
1 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/jsh/erp/controller/ConfigSecurityController.java b/src/main/java/com/jsh/erp/controller/ConfigSecurityController.java
index c0252e1..bf4ff77 100644
--- a/src/main/java/com/jsh/erp/controller/ConfigSecurityController.java
+++ b/src/main/java/com/jsh/erp/controller/ConfigSecurityController.java
@@ -1,8 +1,7 @@
package com.jsh.erp.controller;
-import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
-import com.jsh.erp.datasource.entities.SysDict;
+import com.github.pagehelper.PageInfo;
import com.jsh.erp.dto.ConfigSecurityCreateOrUpdate;
import com.jsh.erp.dto.ConfigSecurityQuery;
import com.jsh.erp.datasource.entities.ConfigSecurity;
@@ -78,15 +77,18 @@
@GetMapping(value = "/list")
@ApiOperation(value = "高级安全防护列表")
- public BaseResponseInfo findAccountInOutList(ConfigSecurityQuery configSecurityQuery,
+ public BaseResponseInfo getPageList(ConfigSecurityQuery configSecurityQuery,
HttpServletRequest request) throws Exception{
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
try {
- List<ConfigSecurity> dataList = configSecurityService.findList(configSecurityQuery);
- Long total = configSecurityService.findListCount(configSecurityQuery);
- map.put("total", total);
- map.put("rows", dataList);
+// List<ConfigSecurity> dataList = configSecurityService.findList(configSecurityQuery);
+// Long total = configSecurityService.findListCount(configSecurityQuery);
+// map.put("total", total);
+// map.put("rows", dataList);
+ PageInfo<ConfigSecurity> pageInfo =configSecurityService.findPageInfo(configSecurityQuery);
+ map.put("total",pageInfo.getTotal());
+ map.put("rows",pageInfo.getList());
res.code = 200;
res.data = map;
} catch(Exception e){
@@ -97,6 +99,26 @@
return res;
}
+ @GetMapping(value = "/enable-list-all")
+ @ApiOperation(value = "高级安全防护列表")
+ public BaseResponseInfo getEnabledListAll() throws Exception{
+ BaseResponseInfo res = new BaseResponseInfo();
+ Map<String, Object> map = new HashMap<String, Object>();
+ try {
+ List<ConfigSecurity> list =configSecurityService.getEnabledListAll();
+ map.put("data",list);
+ res.code = 200;
+ res.data = list;
+ res.msg="查询成功";
+ } catch(Exception e){
+ logger.error(e.getMessage(), e);
+ res.code = 500;
+ res.data = null;
+ res.msg="查询失败";
+ }
+ return res;
+ }
+
@PostMapping
public BaseResponseInfo add(@RequestBody @Valid ConfigSecurityCreateOrUpdate configSecurityCreateOrUpdate) {
--
Gitblit v1.9.3