1、静态动态规则分页查询条件新增审核状态
This commit is contained in:
@@ -108,6 +108,7 @@ public class DynamicRuleController implements DynamicRuleControllerApi {
|
||||
@RequestParam(value = "id", required = false) Integer dynamicRuleId,
|
||||
@RequestParam(value = "source_system", required = false) String protectObjectSourceSystem,
|
||||
@RequestParam(value = "creator", required = false) String creator,
|
||||
@RequestParam(value = "audit_status", required = false) Integer auditStatus,
|
||||
@RequestParam(value = "page", defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "page_size", defaultValue = "10") Integer pageSize) {
|
||||
log.info("分页查询动态规则: {}:{}:{}:{}", dynamicRuleName, dynamicRuleId, page, pageSize);
|
||||
@@ -115,9 +116,9 @@ public class DynamicRuleController implements DynamicRuleControllerApi {
|
||||
return ResponseResult.ok()
|
||||
.setData("success", true)
|
||||
.setData("dynamic_rule_list", dynamicRuleService.queryDynamicRuleObject(dynamicRuleName, dynamicRuleId,
|
||||
protectObjectSourceSystem, creator, page, pageSize))
|
||||
protectObjectSourceSystem, creator, auditStatus, page, pageSize))
|
||||
.setData("total_num",dynamicRuleService.queryDynamicRuleTotalNum(dynamicRuleName, dynamicRuleId,
|
||||
protectObjectSourceSystem, creator));
|
||||
protectObjectSourceSystem, creator, auditStatus));
|
||||
}
|
||||
|
||||
//详情查看?? 就是按id查询吧
|
||||
@@ -170,7 +171,7 @@ public class DynamicRuleController implements DynamicRuleControllerApi {
|
||||
public ResponseResult getStaticRuleStatisticsData(){
|
||||
|
||||
return ResponseResult.ok()
|
||||
.setData("dynamic_rule_num", dynamicRuleService.queryDynamicRuleTotalNum(null, null,
|
||||
.setData("dynamic_rule_num", dynamicRuleService.queryDynamicRuleTotalNum(null,null, null,
|
||||
null, null))
|
||||
.setData("dynamic_rule_used_num", dynamicRuleService.queryAuditDynamicRuleTotalNum(
|
||||
AuditStatusEnum.getNumByState(AuditStatusEnum.USING.getState())
|
||||
|
||||
@@ -347,6 +347,7 @@ public interface DynamicRuleControllerApi {
|
||||
@Parameter(name = "id", description = "动态规则ID", example = "2"),
|
||||
@Parameter(name = "source_system", description = "来源你系统", example = "BW系统"),
|
||||
@Parameter(name = "creator", description = "创建人名称"),
|
||||
@Parameter(name = "audit_status", description = "审核状态", example = "1"),
|
||||
@Parameter(name = "page", description = "页码", example = "1"),
|
||||
@Parameter(name = "page_size", description = "每页大小", example = "10")
|
||||
}
|
||||
@@ -355,6 +356,7 @@ public interface DynamicRuleControllerApi {
|
||||
@RequestParam(value = "id", required = false) Integer dynamicRuleId,
|
||||
@RequestParam(value = "source_system", required = false) String protectObjectSourceSystem,
|
||||
@RequestParam(value = "creator", required = false) String creator,
|
||||
@RequestParam(value = "audit_status", required = false) Integer auditStatus,
|
||||
@RequestParam(value = "page", defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "page_size", defaultValue = "10") Integer pageSize);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public interface DynamicRuleMapper {
|
||||
void deleteDynamicRules(List<Integer> dynamicRuleIds);
|
||||
|
||||
List<DynamicRuleObject> queryDynamicRuleObject(String dynamicRuleName, Integer dynamicRuleId,
|
||||
String sourceSystem, String creator,
|
||||
String sourceSystem, String creator, Integer auditStatus,
|
||||
Integer page, Integer pageSize);
|
||||
|
||||
void deleteDynamicRuleProtectObjectConcat(Integer dynamicRuleId);
|
||||
@@ -43,7 +43,7 @@ public interface DynamicRuleMapper {
|
||||
boolean queryProtectObjectById(Integer protectObjectId);
|
||||
|
||||
Integer queryDynamicRuleTotalNum(String dynamicRuleName, Integer dynamicRuleId,
|
||||
String sourceSystem, String creator);
|
||||
String sourceSystem, String creator, Integer auditStatus);
|
||||
|
||||
List<DynamicRuleObject> queryDynamicRuleByIds(List<Integer> ids);
|
||||
|
||||
|
||||
@@ -171,16 +171,17 @@ public class DynamicRuleService {
|
||||
|
||||
//分页查询基础的动态规则,暂时不返回关联的保护对象
|
||||
public List<DynamicRuleObject> queryDynamicRuleObject(String dynamicRuleName, Integer dynamicRuleId,
|
||||
String templateSourceSystem,String creator,
|
||||
String templateSourceSystem,String creator,Integer auditStatus,
|
||||
Integer page, Integer pageSize) {
|
||||
return dynamicRuleMapper.queryDynamicRuleObject(dynamicRuleName, dynamicRuleId,
|
||||
templateSourceSystem, creator, page, pageSize);
|
||||
templateSourceSystem, creator, auditStatus, page, pageSize);
|
||||
}
|
||||
|
||||
public Integer queryDynamicRuleTotalNum(String dynamicRuleName, Integer dynamicRuleId,
|
||||
String protectObjectSourceSystem, String creator) {
|
||||
String protectObjectSourceSystem, String creator,
|
||||
Integer auditStatus) {
|
||||
return dynamicRuleMapper.queryDynamicRuleTotalNum(dynamicRuleName, dynamicRuleId,
|
||||
protectObjectSourceSystem, creator);
|
||||
protectObjectSourceSystem, creator, auditStatus);
|
||||
}
|
||||
|
||||
public List<DynamicRuleObject> queryDynamicRuleByIds(List<Integer> ids) {
|
||||
|
||||
@@ -134,6 +134,7 @@ public class StaticRuleController implements StaticRuleControllerApi {
|
||||
@RequestParam(name = "id", required = false) Integer static_rule_id,
|
||||
@RequestParam(name = "creator", required = false) String static_rule_creator,
|
||||
@RequestParam(name = "ip", required = false) String static_rule_ip,
|
||||
@RequestParam(name = "auditStatus", required = false) Integer auditStatus,
|
||||
@RequestParam(defaultValue = "1") Integer page,
|
||||
@RequestParam(defaultValue = "10") Integer pageSize
|
||||
) {
|
||||
@@ -141,11 +142,11 @@ public class StaticRuleController implements StaticRuleControllerApi {
|
||||
//调用service新增
|
||||
List<StaticRuleObject> pageResult = staticRuleService.queryStaticRule(
|
||||
static_rule_name, static_rule_id,
|
||||
static_rule_creator, static_rule_ip, page, pageSize);
|
||||
static_rule_creator, static_rule_ip, auditStatus, page, pageSize);
|
||||
return ResponseResult.ok()
|
||||
.setData("static_rule_list", pageResult)
|
||||
.setData("total_num",staticRuleService.queryStaticRuleTotalNum(static_rule_name, static_rule_id,
|
||||
static_rule_creator, static_rule_ip));
|
||||
static_rule_creator, static_rule_ip, auditStatus));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -208,7 +209,7 @@ public class StaticRuleController implements StaticRuleControllerApi {
|
||||
public ResponseResult getStaticRuleStatisticsData(){
|
||||
|
||||
return ResponseResult.ok()
|
||||
.setData("static_rule_num", staticRuleService.queryStaticRuleTotalNum(null, null, null, null))
|
||||
.setData("static_rule_num", staticRuleService.queryStaticRuleTotalNum(null, null, null, null, null))
|
||||
.setData("static_rule_used_num", staticRuleService.queryAuditStaticRuleTotalNum(
|
||||
AuditStatusEnum.getNumByState(AuditStatusEnum.USING.getState())
|
||||
))
|
||||
|
||||
@@ -204,6 +204,7 @@ public interface StaticRuleControllerApi {
|
||||
@Parameter(name = "id", description = "静态规则id"),
|
||||
@Parameter(name = "creator", description = "静态规则创建人"),
|
||||
@Parameter(name = "ip", description = "静态规则ip,匹配所有源和目的ip"),
|
||||
@Parameter(name = "auditStatus", description = "静态规则审核状态"),
|
||||
@Parameter(name = "page", description = "页码"),
|
||||
@Parameter(name = "pageSize", description = "每页条数")
|
||||
}
|
||||
@@ -212,6 +213,7 @@ public interface StaticRuleControllerApi {
|
||||
@RequestParam(required = false) Integer static_rule_id,
|
||||
@RequestParam(required = false) String static_rule_creator,
|
||||
@RequestParam(required = false) String static_rule_ip,
|
||||
@RequestParam(required = false) Integer auditStatus,
|
||||
@RequestParam(defaultValue = "1") Integer page,
|
||||
@RequestParam(defaultValue = "10") Integer pageSize
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@ public interface StaticRuleMapper {
|
||||
|
||||
//多页查询静态规则
|
||||
List<StaticRuleObject> queryStaticRule(String static_rule_name, Integer static_rule_id,
|
||||
String static_rule_create_username, String ip,
|
||||
String static_rule_create_username, String ip, Integer auditStatus,
|
||||
Integer page, Integer pageSize);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public interface StaticRuleMapper {
|
||||
Boolean updateAuditStatusById(Integer id, Integer auditStatus);
|
||||
|
||||
Integer queryStaticRuleTotalNum(String static_rule_name, Integer static_rule_id,
|
||||
String static_rule_create_username, String ip);
|
||||
String static_rule_create_username, String ip, Integer auditStatus);
|
||||
|
||||
List<StaticRuleObject> queryStaticRuleByIds(List<Integer> ids);
|
||||
|
||||
|
||||
@@ -166,11 +166,11 @@ public class StaticRuleService {
|
||||
*/
|
||||
public List<StaticRuleObject> queryStaticRule(
|
||||
String static_rule_name, Integer static_rule_id,
|
||||
String creator, String ip,
|
||||
String creator, String ip, Integer auditStatus,
|
||||
Integer page, Integer pageSize) {
|
||||
|
||||
return staticRuleMapper.queryStaticRule(static_rule_name, static_rule_id,
|
||||
creator, ip, page, pageSize);
|
||||
creator, ip, auditStatus, page, pageSize);
|
||||
}
|
||||
|
||||
public Boolean newStaticRuleObjects(List<StaticRuleObject> staticRuleList) {
|
||||
@@ -233,9 +233,9 @@ public class StaticRuleService {
|
||||
}
|
||||
|
||||
public Integer queryStaticRuleTotalNum(String static_rule_name, Integer static_rule_id,
|
||||
String static_rule_creator, String static_rule_ip) {
|
||||
String static_rule_creator, String static_rule_ip, Integer auditStatus) {
|
||||
return staticRuleMapper.queryStaticRuleTotalNum(static_rule_name, static_rule_id,
|
||||
static_rule_creator, static_rule_ip);
|
||||
static_rule_creator, static_rule_ip, auditStatus);
|
||||
}
|
||||
|
||||
public List<StaticRuleObject> queryStaticRuleByIds(List<Integer> ids) {
|
||||
|
||||
Reference in New Issue
Block a user