1、DynamicRule实现新增、删除、修改、id查询、分页查询功能。并在crud时与ProtectObject关联。
2、StaticRule添加批量导入、模板文件下载功能,使用sqlSessionWrapper重写批量删除 3、WhiteList添加模板文件下载功能
This commit is contained in:
@@ -14,17 +14,37 @@
|
||||
static_rule_dip, static_rule_mdip, static_rule_dport, static_rule_mdport,
|
||||
static_rule_protocol, static_rule_mprotocol, static_rule_dns,
|
||||
static_rule_url, static_rule_priority, static_rule_range,
|
||||
static_rule_frequency, static_rule_protect_level, static_rule_audit_status)
|
||||
static_rule_frequency, static_rule_audit_status)
|
||||
values (#{object.staticRuleName}, #{object.staticRuleCreateTime}, #{object.staticRuleCreateUsername},
|
||||
#{object.staticRuleCreateDepart}, #{object.staticRuleCreateUserId}, INET_ATON(#{object.staticRuleSip}),
|
||||
INET_ATON(#{object.staticRuleMsip}), #{object.staticRuleSport}, #{object.staticRuleMsport},
|
||||
INET_ATON(#{object.staticRuleDip}), INET_ATON(#{object.staticRuleMdip}), #{object.staticRuleDport},
|
||||
#{object.staticRuleMdport}, #{object.staticRuleProtocol}, #{object.staticRuleMprotocol},
|
||||
#{object.staticRuleDns}, #{object.staticRuleURL}, #{object.staticRulePriority},
|
||||
#{object.staticRuleRange}, #{object.staticRuleFrequency}, #{object.staticRuleProtectLevel},
|
||||
#{object.staticRuleRange}, #{object.staticRuleFrequency},
|
||||
#{object.staticRuleAuditStatus})
|
||||
</insert>
|
||||
|
||||
<insert id="newStaticRules">
|
||||
insert into t_static_rule(static_rule_name, static_rule_create_time,
|
||||
static_rule_create_username, static_rule_create_depart,
|
||||
static_rule_create_user_id, static_rule_sip, static_rule_msip,
|
||||
static_rule_sport, static_rule_msport,
|
||||
static_rule_dip, static_rule_mdip, static_rule_dport, static_rule_mdport,
|
||||
static_rule_protocol, static_rule_mprotocol, static_rule_dns,
|
||||
static_rule_url, static_rule_priority, static_rule_range,
|
||||
static_rule_frequency, static_rule_audit_status)
|
||||
values
|
||||
<foreach collection="staticRuleBatch" item="object" separator=",">
|
||||
(#{object.staticRuleName}, #{object.staticRuleCreateTime}, #{object.staticRuleCreateUsername},
|
||||
#{object.staticRuleCreateDepart}, #{object.staticRuleCreateUserId}, INET_ATON(#{object.staticRuleSip}),
|
||||
INET_ATON(#{object.staticRuleMsip}), #{object.staticRuleSport}, #{object.staticRuleMsport},
|
||||
INET_ATON(#{object.staticRuleDip}), INET_ATON(#{object.staticRuleMdip}), #{object.staticRuleDport},
|
||||
#{object.staticRuleMdport}, #{object.staticRuleProtocol}, #{object.staticRuleMprotocol},
|
||||
#{object.staticRuleDns}, #{object.staticRuleURL}, #{object.staticRulePriority},
|
||||
#{object.staticRuleRange}, #{object.staticRuleFrequency},
|
||||
0)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateStaticRule">
|
||||
@@ -54,12 +74,13 @@
|
||||
<if test="staticRuleFrequency != null and staticRuleFrequency != ''">
|
||||
static_rule_frequency = #{staticRuleFrequency},
|
||||
</if>
|
||||
<if test="staticRuleProtectLevel != null and staticRuleProtectLevel != ''">
|
||||
static_rule_protect_level = #{staticRuleProtectLevel},
|
||||
</if>
|
||||
|
||||
</set>
|
||||
where static_rule_id = #{staticRuleId}
|
||||
</update>
|
||||
<delete id="deleteStaticRules">
|
||||
|
||||
</delete>
|
||||
|
||||
<resultMap id="staticRuleMap" type="com.realtime.protection.configuration.entity.rule.staticrule.StaticRuleObject">
|
||||
<id column="static_rule_id" property="staticRuleId"/>
|
||||
|
||||
Reference in New Issue
Block a user