1、动态、静态规则、任务、白名单、防护对象、策略模板的查询总数增加了条件

2、指令分页查询还有bug
This commit is contained in:
Hao Miao
2024-01-23 12:17:10 +08:00
parent 121fff1d18
commit b6e046c754
28 changed files with 160 additions and 34 deletions

View File

@@ -161,6 +161,21 @@
<select id="queryStaticRuleTotalNum" resultType="java.lang.Integer">
SELECT COUNT(*)
FROM t_static_rule
<where>
<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>
<if test="static_rule_create_username != null and static_rule_create_username != ''">
AND static_rule_create_username like concat('%', #{static_rule_create_username}, '%')
</if>
<if test="ip != null and ip != ''">
AND (static_rule_sip = INET_ATON(#{ip}) or static_rule_msip = INET_ATON(#{ip})
or static_rule_dip = INET_ATON(#{ip}) or static_rule_mdip = INET_ATON(#{ip}))
</if>
</where>
</select>
</mapper>