1、分页查询条件id变为display

2、修改为设置审核状态为pending,删去审核通过才能修改的限制
3、bugfix
This commit is contained in:
PushM
2024-06-10 04:10:18 +08:00
parent 793f835b18
commit 274eecfa79
28 changed files with 80 additions and 70 deletions

View File

@@ -172,6 +172,7 @@ public class StaticRuleObject {
@JsonProperty("event_type")
@ExcelProperty("事件类型")
@ExcelIgnore
@Schema(description = "事件类型", example = "DDos")
private String eventType;

View File

@@ -90,8 +90,7 @@ public class ProtectObjectController implements ProtectObjectControllerApi {
public ResponseResult queryProtectObjects(@RequestParam(value = "proobj_name", required = false)
String protectObjectName,
@RequestParam(value = "proobj_id", required = false)
@Min(value = 1, message = "ID值不可小于1")
Integer protectObjectId,
String protectObjectId,
@RequestParam(value = "proobj_systemm_name", required = false)
String protectObjectSystemName,
@RequestParam(value = "proobj_ip_address", required = false)

View File

@@ -178,8 +178,7 @@ public interface ProtectObjectControllerApi {
ResponseResult queryProtectObjects(@RequestParam(value = "proobj_name", required = false)
String protectObjectName,
@RequestParam(value = "proobj_id", required = false)
@Min(value = 1, message = "ID值不可小于1")
Integer protectObjectId,
String protectObjectId,
@RequestParam(value = "proobj_systemm_name", required = false)
String protectObjectSystemName,
@RequestParam(value = "proobj_ip_address", required = false)

View File

@@ -28,7 +28,7 @@ public interface ProtectObjectMapper {
Integer queryProtectObjectsTotalNum(@Param("proobj_name") String protectObjectName,
@Param("proobj_id") Integer protectObjectId,
@Param("proobj_id") String protectObjectId,
@Param("proobj_system_name") String protectObjectSystemName,
@Param("proobj_ip") String protectObjectIPAddress,
@Param("proobj_port_min") Integer protectObjectPortMin,
@@ -39,7 +39,7 @@ public interface ProtectObjectMapper {
@Param("proobj_audit_status") Integer protectObjectAuditStatus);
List<ProtectObject> queryProtectObjects(@Param("proobj_name") String protectObjectName,
@Param("proobj_id") Integer protectObjectId,
@Param("proobj_id") String protectObjectId,
@Param("proobj_system_name") String protectObjectSystemName,
@Param("proobj_ip") String protectObjectIPAddress,
@Param("proobj_port_min") Integer protectObjectPortMin,

View File

@@ -76,7 +76,7 @@ public class ProtectObjectService {
return sqlSessionWrapper.startBatchSession(ProtectObjectMapper.class, newProtectObjectFunction, protectObjectList);
}
public List<ProtectObject> queryProtectObjects(String protectObjectName, Integer protectObjectId,
public List<ProtectObject> queryProtectObjects(String protectObjectName, String protectObjectId,
String protectObjectSystemName, String protectObjectIPAddress,
Integer protectObjectPortMin, Integer protectObjectPortMax,
String protectObjectURL, String protectObjectProtocol,
@@ -94,11 +94,11 @@ public class ProtectObjectService {
}
public Boolean updateProtectObject(ProtectObject protectObject) {
if (!protectObjectMapper.queryProtectObject(protectObject.getProtectObjectId())
.getProtectObjectAuditStatus()
.equals(AuditStatusEnum.AUDITED.getNum())) {
return false;
}
// if (!protectObjectMapper.queryProtectObject(protectObject.getProtectObjectId())
// .getProtectObjectAuditStatus()
// .equals(AuditStatusEnum.AUDITED.getNum())) {
// return false;
// }
protectObject.setProtectObjectAuditStatus(AuditStatusEnum.PENDING.getNum());
@@ -174,7 +174,7 @@ public class ProtectObjectService {
return resultMap;
}
public Integer queryProtectObjectsTotalNum(String protectObjectName, Integer protectObjectId,
public Integer queryProtectObjectsTotalNum(String protectObjectName, String protectObjectId,
String protectObjectSystemName, String protectObjectIPAddress,
Integer protectObjectPortMin, Integer protectObjectPortMax,
String protectObjectURL, String protectObjectProtocol,

View File

@@ -59,7 +59,7 @@ public class TemplateController implements TemplateNewCpntrollerApi{
public ResponseResult queryTemplates(@RequestParam(value = "template_name", required = false) String templateName,
@RequestParam(value = "source_system", required = false) String sourceSystem,
@RequestParam(value = "create_user_name", required = false) String createUserName,
@RequestParam(value = "template_id", required = false) Integer templateId,
@RequestParam(value = "template_id", required = false) String templateId,
@RequestParam(value = "audit_status", required = false) Integer auditStatus,
@RequestParam(value = "event_type", required = false) String eventType,
@RequestParam(value = "protect_level", required = false) Integer protectLevel,

View File

@@ -16,7 +16,7 @@ public interface TemplateMapper {
List<TemplateNew> queryTemplates(@Param("template_name") String templateName,
@Param("source_system") String sourceSystem,
@Param("create_username") String createUsername,
@Param("template_id")Integer templateId,
@Param("template_id")String templateId,
@Param("audit_status")Integer auditStatus,
@Param("event_type")String eventType,
@Param("protect_level")Integer protectLevel,
@@ -34,7 +34,7 @@ public interface TemplateMapper {
Integer queryTemplateTotalNum(@Param("template_name") String templateName,
@Param("source_system") String sourceSystem,
@Param("create_username") String createUsername,
@Param("template_id")Integer templateId,
@Param("template_id")String templateId,
@Param("audit_status")Integer auditStatus,
@Param("event_type")String eventType,
@Param("protect_level")Integer protectLevel

View File

@@ -94,7 +94,7 @@ public interface TemplateNewCpntrollerApi {
ResponseResult queryTemplates(@RequestParam(value = "template_name", required = false) String templateName,
@RequestParam(value = "source_system", required = false) String sourceSystem,
@RequestParam(value = "create_user_name", required = false) String createUserName,
@RequestParam(value = "template_id", required = false) Integer templateId,
@RequestParam(value = "template_id", required = false) String templateId,
@RequestParam(value = "audit_status", required = false) Integer auditStatus,
@RequestParam(value = "event_type", required = false) String eventType,
@RequestParam(value = "protect_level", required = false) Integer protectLevel,

View File

@@ -4,6 +4,7 @@ import com.realtime.protection.configuration.entity.defense.template.TemplateNew
import com.realtime.protection.configuration.entity.rule.staticrule.StaticRuleObject;
import com.realtime.protection.configuration.utils.Counter;
import com.realtime.protection.configuration.utils.SqlSessionWrapper;
import com.realtime.protection.configuration.utils.enums.audit.AuditStatusEnum;
import com.realtime.protection.configuration.utils.enums.audit.AuditStatusValidator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DuplicateKeyException;
@@ -49,7 +50,7 @@ public class TemplateService {
}
public List<TemplateNew> queryTemplates(String templateName, String sourceSystem, String createUserName,
Integer templateId, Integer auditStatus,
String templateId, Integer auditStatus,
String eventType, Integer protectLevel,
Integer page, Integer pageSize) {
return templateMapper.queryTemplates(templateName, sourceSystem, createUserName,
@@ -58,6 +59,7 @@ public class TemplateService {
public Boolean updateTemplate(Integer templateId, TemplateNew template) {
template.setTemplateId(templateId);
template.setAuditStatus(String.valueOf(AuditStatusEnum.PENDING.getNum()));
return templateMapper.updateTemplateInformation(template);
}
@@ -74,7 +76,7 @@ public class TemplateService {
public Integer queryTemplateTotalNum(
String templateName, String sourceSystem, String createUserName,
Integer templateId, Integer auditStatus,
String templateId, Integer auditStatus,
String eventType, Integer protectLevel) {
return templateMapper.queryTemplateTotalNum(templateName, sourceSystem, createUserName,
templateId,auditStatus,eventType, protectLevel );

View File

@@ -120,7 +120,7 @@ public class DynamicRuleController implements DynamicRuleControllerApi {
@Override
@GetMapping("/query")
public ResponseResult queryDynamicRuleObject(@RequestParam(value = "name", required = false) String dynamicRuleName,
@RequestParam(value = "id", required = false) Integer dynamicRuleId,
@RequestParam(value = "id", required = false) String dynamicRuleId,
@RequestParam(value = "source_system", required = false) String protectObjectSourceSystem,
@RequestParam(value = "creator", required = false) String creator,
@RequestParam(value = "audit_status", required = false) Integer auditStatus,

View File

@@ -360,7 +360,7 @@ public interface DynamicRuleControllerApi {
}
)
ResponseResult queryDynamicRuleObject(@RequestParam(value = "name", required = false) String dynamicRuleName,
@RequestParam(value = "id", required = false) Integer dynamicRuleId,
@RequestParam(value = "id", required = false) String dynamicRuleId,
@RequestParam(value = "source_system", required = false) String protectObjectSourceSystem,
@RequestParam(value = "creator", required = false) String creator,
@RequestParam(value = "audit_status", required = false) Integer auditStatus,

View File

@@ -27,7 +27,7 @@ public interface DynamicRuleMapper {
void deleteDynamicRules(List<Integer> dynamicRuleIds);
List<DynamicRuleObject> queryDynamicRuleObject(String dynamicRuleName, Integer dynamicRuleId,
List<DynamicRuleObject> queryDynamicRuleObject(String dynamicRuleName, String dynamicRuleId,
String sourceSystem, String creator, Integer auditStatus,
String eventType, Integer protectLevel, String templateName,
String auditUserName, String createDate,
@@ -35,7 +35,7 @@ public interface DynamicRuleMapper {
boolean queryProtectObjectById(Integer protectObjectId);
Integer queryDynamicRuleTotalNum(String dynamicRuleName, Integer dynamicRuleId,
Integer queryDynamicRuleTotalNum(String dynamicRuleName, String dynamicRuleId,
String sourceSystem, String creator, Integer auditStatus
, String eventType, Integer protectLevel, String templateName,
String auditUserName, String createDate);

View File

@@ -6,6 +6,7 @@ import com.realtime.protection.configuration.entity.rule.staticrule.StaticRuleOb
import com.realtime.protection.configuration.utils.Counter;
import com.realtime.protection.configuration.utils.SqlSessionWrapper;
import com.realtime.protection.configuration.utils.enums.StateEnum;
import com.realtime.protection.configuration.utils.enums.audit.AuditStatusEnum;
import com.realtime.protection.configuration.utils.enums.audit.AuditStatusValidator;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -115,7 +116,7 @@ public class DynamicRuleService {
//更新DynamicRule
// dynamicRuleMapper
dynamicRuleObject.setAuditStatus(AuditStatusEnum.PENDING.getNum());
Boolean idValid = dynamicRuleMapper.updateDynamicRuleObject(dynamicRuleId, dynamicRuleObject);
if (!idValid) {
throw new IllegalArgumentException("动态规则id无效");
@@ -129,6 +130,7 @@ public class DynamicRuleService {
if (!ProtectObjIdValid) {
throw new IllegalArgumentException("防护对象id无效");
}
*/
return idValid;
@@ -178,7 +180,7 @@ public class DynamicRuleService {
//分页查询基础的动态规则,暂时不返回关联的保护对象
public List<DynamicRuleObject> queryDynamicRuleObject(String dynamicRuleName, Integer dynamicRuleId,
public List<DynamicRuleObject> queryDynamicRuleObject(String dynamicRuleName, String dynamicRuleId,
String templateSourceSystem,String creator,Integer auditStatus,
String eventType, Integer protectLevel, String templateName,
String auditUserName, String createDate,
@@ -187,7 +189,7 @@ public class DynamicRuleService {
templateSourceSystem, creator, auditStatus, eventType, protectLevel, templateName, auditUserName, createDate, page, pageSize);
}
public Integer queryDynamicRuleTotalNum(String dynamicRuleName, Integer dynamicRuleId,
public Integer queryDynamicRuleTotalNum(String dynamicRuleName, String dynamicRuleId,
String protectObjectSourceSystem, String creator,
Integer auditStatus, String eventType, Integer protectLevel,
String templateName,String auditUserName, String createDate) {

View File

@@ -152,7 +152,7 @@ public class StaticRuleController implements StaticRuleControllerApi {
@Override
@GetMapping("/query")
public ResponseResult queryStaticRule(@RequestParam(name = "name", required = false) String static_rule_name,
@RequestParam(name = "id", required = false) Integer static_rule_id,
@RequestParam(name = "id", required = false) String static_rule_id,
@RequestParam(name = "creator", required = false) String static_rule_creator,
@RequestParam(name = "sip", required = false) String static_rule_sip,
@RequestParam(name = "sport", required = false) Integer static_rule_sport,

View File

@@ -220,7 +220,7 @@ public interface StaticRuleControllerApi {
}
)
ResponseResult queryStaticRule(@RequestParam(required = false) String static_rule_name,
@RequestParam(required = false) Integer static_rule_id,
@RequestParam(required = false) String static_rule_id,
@RequestParam(required = false) String static_rule_creator,
@RequestParam(required = false) String static_rule_sip,
@RequestParam(required = false) Integer static_rule_sport,

View File

@@ -27,7 +27,7 @@ public interface StaticRuleMapper {
StaticRuleObject queryStaticRuleById(Integer id);
//多页查询静态规则
List<StaticRuleObject> queryStaticRule(String static_rule_name, Integer static_rule_id,
List<StaticRuleObject> queryStaticRule(String static_rule_name, String static_rule_id,
String static_rule_create_username, String sip,
Integer sport, String dip, Integer dport,
Integer auditStatus, String auditUserName, String createDate,
@@ -46,7 +46,7 @@ public interface StaticRuleMapper {
String auditUserDepart);
Boolean updateAuditStatusById(Integer id, Integer auditStatus);
Integer queryStaticRuleTotalNum(String static_rule_name, Integer static_rule_id,
Integer queryStaticRuleTotalNum(String static_rule_name, String static_rule_id,
String static_rule_create_username,
String sip, Integer sport,
String dip, Integer dport,

View File

@@ -182,7 +182,7 @@ public class StaticRuleService {
分页查询
*/
public List<StaticRuleObject> queryStaticRule(
String static_rule_name, Integer static_rule_id,
String static_rule_name, String static_rule_id,
String creator,
String static_rule_sip, Integer static_rule_sport,
String static_rule_dip, Integer static_rule_dport,
@@ -267,7 +267,7 @@ public class StaticRuleService {
staticRuleMapper.deleteStaticRuleById(id);
}
public Integer queryStaticRuleTotalNum(String static_rule_name, Integer static_rule_id,
public Integer queryStaticRuleTotalNum(String static_rule_name, String static_rule_id,
String static_rule_creator,
String static_rule_sip, Integer static_rule_sport,
String static_rule_dip, Integer static_rule_dport,

View File

@@ -81,7 +81,7 @@ public class WhiteListController implements WhiteListControllerApi {
@Override
@GetMapping("/query")
public ResponseResult queryWhiteListObject(@RequestParam(value = "whiteobj_name", required = false) String whiteListName,
@RequestParam(value = "whiteobj_id", required = false) Integer whiteListId,
@RequestParam(value = "whiteobj_id", required = false) String whiteListId,
@RequestParam(value = "system_name", required = false) String systemName,
@RequestParam(value = "audit_status", required = false) Integer auditStatus,
@RequestParam(value = "creator", required = false) String creator,

View File

@@ -112,7 +112,7 @@ public interface WhiteListControllerApi {
}
)
ResponseResult queryWhiteListObject(@RequestParam(value = "whiteobj_name", required = false) String whiteListName,
@RequestParam(value = "whiteobj_id", required = false) Integer whiteListId,
@RequestParam(value = "whiteobj_id", required = false) String whiteListId,
@RequestParam(value = "system_name", required = false) String systemName,
@RequestParam(value = "audit_status", required = false) Integer auditStatus,
@RequestParam(value = "creator", required = false) String creator,

View File

@@ -19,7 +19,7 @@ public interface WhiteListMapper {
void newWhiteListObject(@Param("object") WhiteListObject object);
//分页查询
List<WhiteListObject> queryWhiteListObject(String whiteListName, Integer whiteListId,
List<WhiteListObject> queryWhiteListObject(String whiteListName, String whiteListId,
String systemName, Integer auditStatus, String creator,
Integer page, Integer pageSize);
@@ -46,7 +46,7 @@ public interface WhiteListMapper {
List<WhiteListObject> whiteListCommandCheck(@Param("command") FiveTupleWithMask fiveTupleWithMaskInCommand);
Integer queryWhiteListTotalNum(String whiteListName, Integer whiteListId
Integer queryWhiteListTotalNum(String whiteListName, String whiteListId
, String systemName, Integer auditStatus, String creator);
List<WhiteListObject> whiteListCommandsCheck(List<TaskCommandInfo> taskCommandInfos);

View File

@@ -126,16 +126,16 @@ public class WhiteListService {
if (auditStatus == null) {
throw new IllegalArgumentException("无法找到白名单 " + id + ", 可能该白名单不存在");
}
if (!whiteListMapper.queryWhiteListObjectAuditStuatusById(id).equals(AuditStatusEnum.AUDITED.getNum())) {
throw new IllegalStateException("无法修改白名单信息,因为其并未处于" + AuditStatusEnum.AUDITED + "状态");
}
// if (!whiteListMapper.queryWhiteListObjectAuditStuatusById(id).equals(AuditStatusEnum.AUDITED.getNum())) {
// throw new IllegalStateException("无法修改白名单信息,因为其并未处于" + AuditStatusEnum.AUDITED + "状态");
// }
object.setWhiteListAuditStatus(AuditStatusEnum.PENDING.getNum());
return whiteListMapper.updateWhiteListObject(id, object);
}
public List<WhiteListObject> queryWhiteListObject(String whiteListName, Integer whiteListId,
public List<WhiteListObject> queryWhiteListObject(String whiteListName, String whiteListId,
String systemName, Integer auditStatus, String creator,
Integer page, Integer pageSize) {
return whiteListMapper.queryWhiteListObject(whiteListName, whiteListId, systemName, auditStatus, creator, page, pageSize);
@@ -214,7 +214,7 @@ public class WhiteListService {
return resultMap;
}
public Integer queryWhiteListTotalNum(String whiteListName, Integer whiteListId
public Integer queryWhiteListTotalNum(String whiteListName, String whiteListId
, String systemName, Integer auditStatus, String creator){
return whiteListMapper.queryWhiteListTotalNum(whiteListName, whiteListId, systemName, auditStatus, creator);
}

View File

@@ -22,7 +22,7 @@
<result column="template_id" property="templateId"/>
<result column="task_range" property="distributePoint"/>
<result column="strategy_template_name" property="eventType"/>
<result column="event_type" property="eventType"/>
<result column="dynamic_rule_protect_level" property="protectLevel"/>
<result column="task_status" property="taskStatus"/>
@@ -238,14 +238,14 @@
t_task.task_range,
t_task.protect_level,
t_task.task_status,
t_tmplate.strategy_template_name
t_task.event_type
-- t_tmplate.strategy_template_name
from t_task
left join realtime_protection.t_dynamic_rule t_dr on
(t_task.task_id = t_dr.dynamic_rule_used_task_id and t_dr.dynamic_rule_id = #{dynamicRuleId})
left join realtime_protection.t_strategy_template_new t_tmplate on
( t_task.template_id = t_tmplate.strategy_template_id )
-- left join realtime_protection.t_strategy_template_new t_tmplate on
-- ( t_task.template_id = t_tmplate.strategy_template_id )
where
t_task.task_id = #{taskId}
</select>

View File

@@ -166,6 +166,7 @@
<if test="object.dynamicRuleSourceSystem != null">source_system = #{object.dynamicRuleSourceSystem},</if>
<if test="object.bwSql != null">bw_sql = #{object.bwSql},</if>
modify_time = NOW()
audit_status = #{object.auditStatus}
where
dynamic_rule_id = #{dynamicRuleId}
</update>
@@ -332,8 +333,8 @@
<if test="dynamicRuleName != null and dynamicRuleName !=''" >
t_dynamic_rule.dynamic_rule_name like concat('%', #{dynamicRuleName}, '%')
</if>
<if test="dynamicRuleId != null">
and t_dynamic_rule.dynamic_rule_id = #{dynamicRuleId}
<if test="dynamicRuleId != null and dynamicRuleId != ''">
and t_dynamic_rule.dynamic_rule_display_id like concat('%', #{dynamicRuleId}, '%')
</if>
<if test="sourceSystem != null and sourceSystem !=''">
and t_dynamic_rule.source_system = #{sourceSystem}
@@ -393,8 +394,8 @@
<if test="dynamicRuleName != null">
t_dynamic_rule.dynamic_rule_name like concat('%', #{dynamicRuleName}, '%')
</if>
<if test="dynamicRuleId != null">
and t_dynamic_rule.dynamic_rule_id = #{dynamicRuleId}
<if test="dynamicRuleId != null and dynamicRuleId != ''">
and t_dynamic_rule.dynamic_rule_display_id like concat('%', #{dynamicRuleId}, '%')
</if>
<if test="sourceSystem != null">
and t_dynamic_rule.source_system = #{sourceSystem}

View File

@@ -162,8 +162,11 @@
FROM t_protect_object
<where>
<if test="proobj_name != null and proobj_name != '' ">AND protect_object_name LIKE CONCAT('%', #{proobj_name}, '%')</if>
<if test="proobj_id != null">AND protect_object_id = #{proobj_id}</if>
<if test="proobj_name != null and proobj_name != '' ">
AND protect_object_name LIKE CONCAT('%', #{proobj_name}, '%')</if>
<if test="proobj_id != null and proobj_id != '' ">
AND protect_object_display_id LIKE CONCAT('%', #{proobj_id}, '%')
</if>
<if test="proobj_system_name != null and proobj_system_name != '' ">
AND protect_object_system_name LIKE CONCAT('%', #{proobj_system_name}, '%')
</if>
@@ -223,7 +226,9 @@
SELECT COUNT(protect_object_id) FROM t_protect_object
<where>
<if test="proobj_name != null and proobj_name != '' ">AND protect_object_name LIKE CONCAT('%', #{proobj_name}, '%')</if>
<if test="proobj_id != null">AND protect_object_id = #{proobj_id}</if>
<if test="proobj_id != null and proobj_id != '' ">
AND protect_object_display_id LIKE CONCAT('%', #{proobj_id}, '%')
</if>
<if test="proobj_system_name != null and proobj_system_name != '' ">
AND protect_object_system_name LIKE CONCAT('%', #{proobj_system_name}, '%')
</if>

View File

@@ -361,8 +361,8 @@
<if test="static_rule_name != null and static_rule_name != ''">
static_rule_name like concat('%', #{static_rule_name}, '%')
</if>
<if test="static_rule_id != null">
AND static_rule_id = #{static_rule_id}
<if test="static_rule_id != null and static_rule_id != ''">
AND static_rule_display_id like concat('%', #{static_rule_id}, '%')
</if>
<if test="static_rule_create_username != null and static_rule_create_username != ''">
AND static_rule_create_username like concat('%', #{static_rule_create_username}, '%')
@@ -426,8 +426,8 @@
<if test="static_rule_name != null and static_rule_name != ''">
static_rule_name like concat('%', #{static_rule_name}, '%')
</if>
<if test="static_rule_id != null">
AND static_rule_id = #{static_rule_id}
<if test="static_rule_id != null and static_rule_id != ''">
AND static_rule_display_id like concat('%', #{static_rule_id}, '%')
</if>
<if test="static_rule_create_username != null and static_rule_create_username != ''">
AND static_rule_create_username like concat('%', #{static_rule_create_username}, '%')

View File

@@ -23,7 +23,7 @@
<update id="newTaskStaticRuleConcat">
UPDATE t_static_rule
SET static_rule_used_task_id = #{task_id}
SET static_rule_used_task_id = #{task_id},
static_rule_audit_status = #{status}
WHERE
<if test="rule_ids != null and rule_ids.size() > 0">
@@ -36,7 +36,7 @@
<update id="newTaskDynamicRuleConcat">
UPDATE t_dynamic_rule
SET dynamic_rule_used_task_id = #{task_id}
SET dynamic_rule_used_task_id = #{task_id},
audit_status = #{status}
WHERE
<if test="rule_ids != null and rule_ids.size() > 0">
@@ -128,7 +128,7 @@
AND event_type LIKE CONCAT('%', #{event_type}, '%')
</if>
<if test="create_date != null and create_date != '' ">
AND task_crate_time LIKE CONCAT('%', #{create_date}, '%')
AND task_create_time LIKE CONCAT('%', #{create_date}, '%')
</if>
<if test="start_date != null and start_date != '' ">
AND task_start_time LIKE CONCAT('%', #{start_date}, '%')
@@ -515,7 +515,7 @@
FROM t_task
LEFT JOIN realtime_protection.t_static_rule tsr on t_task.task_id = tsr.static_rule_used_task_id
WHERE task_id = #{task_id}
AND tsr.static_rule_audit_status = 2
-- AND tsr.static_rule_audit_status = 2
</select>
<resultMap id="dynamicTaskInfoMap" type="com.realtime.protection.configuration.entity.task.DynamicTaskInfo">
@@ -602,7 +602,7 @@
AND event_type LIKE CONCAT('%', #{event_type}, '%')
</if>
<if test="create_date != null and create_date != '' ">
AND task_crate_time LIKE CONCAT('%', #{create_date}, '%')
AND task_create_time LIKE CONCAT('%', #{create_date}, '%')
</if>
<if test="start_date != null and start_date != '' ">
AND task_start_time LIKE CONCAT('%', #{start_date}, '%')

View File

@@ -169,6 +169,7 @@
<if test="template.isProtectObjectDst != null">is_protect_object_dst = #{template.isProtectObjectDst},</if>
<if test="template.isProtectObjectSrc != null">is_protect_object_src = #{template.isProtectObjectSrc},</if>
audit_status = #{template.auditStatus},
modify_time = NOW()
</set>
<where>
@@ -299,8 +300,8 @@
<if test="template_name != null and template_name != '' ">
AND strategy_template_name LIKE CONCAT('%', #{template_name}, '%')
</if>
<if test="template_id != null">
AND strategy_template_id = #{template_id}
<if test="template_id != null and template_id != ''">
AND strategy_template_display_id LIKE CONCAT('%', #{template_id}, '%')
</if>
<if test="audit_status != null">
AND audit_status = #{audit_status}
@@ -343,8 +344,8 @@
<if test="template_name != null and template_name != '' ">
AND strategy_template_name LIKE CONCAT('%', #{template_name}, '%')
</if>
<if test="template_id != null">
AND strategy_template_id = #{template_id}
<if test="template_id != null and template_id != ''">
AND strategy_template_display_id LIKE CONCAT('%', #{template_id}, '%')
</if>
<if test="audit_status != null">
AND audit_status = #{audit_status}

View File

@@ -177,8 +177,8 @@
<if test="whiteListName != null and whiteListName != '' ">
white_list_name like concat('%', #{whiteListName}, '%')
</if>
<if test="whiteListId != null">
and white_list_id = #{whiteListId}
<if test="whiteListId != null and whiteListId != ''">
and hite_list_display_id like concat('%', #{whiteListId}, '%')
</if>
<if test="systemName != null and systemName != '' ">
and white_list_system_name like concat('%', #{systemName}, '%')
@@ -404,8 +404,8 @@
<if test="whiteListName != null and whiteListName != '' ">
white_list_name like concat('%', #{whiteListName}, '%')
</if>
<if test="whiteListId != null">
and white_list_id = #{whiteListId}
<if test="whiteListId != null and whiteListId != ''">
and hite_list_display_id like concat('%', #{whiteListId}, '%')
</if>
<if test="systemName != null and systemName != '' ">
and white_list_system_name like concat('%', #{systemName}, '%')