@@ -28,6 +28,13 @@ public class UserFull {
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getOrgName() {
|
||||
if (orgs.size() > 0) {
|
||||
return orgs.get(0).orgName;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getRoleKey() {
|
||||
if (roles.size() > 0) {
|
||||
return roles.get(0).roleKey;
|
||||
|
||||
@@ -104,12 +104,12 @@
|
||||
<select id="queryProtectObjectsTotalNum" resultType="java.lang.Integer">
|
||||
SELECT COUNT(protect_object_id) FROM t_protect_object
|
||||
<where>
|
||||
<if test="proobj_name != null">AND protect_object_name LIKE CONCAT('%', #{proobj_name}, '%')</if>
|
||||
<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_system_name != null">
|
||||
<if test="proobj_system_name != null and proobj_system_name != '' ">
|
||||
AND protect_object_system_name LIKE CONCAT('%', #{proobj_system_name}, '%')
|
||||
</if>
|
||||
<if test="proobj_ip != null">
|
||||
<if test="proobj_ip != null and proobj_ip != '' ">
|
||||
AND protect_object_id IN (
|
||||
SELECT protect_object_id FROM t_protect_object_inet_addr_view tpo_view
|
||||
WHERE tpo_view.protect_object_ip LIKE CONCAT('%', #{proobj_ip}, '%')
|
||||
@@ -121,7 +121,7 @@
|
||||
<if test="proobj_port_max != null">
|
||||
AND protect_object_port <= #{proobj_port_max}
|
||||
</if>
|
||||
<if test="proobj_url != null">
|
||||
<if test="proobj_url != null and proobj_url != '' ">
|
||||
AND protect_object_url LIKE CONCAT('%', #{proobj_url}, '%')
|
||||
</if>
|
||||
<if test="proobj_protocol != null">
|
||||
|
||||
@@ -79,29 +79,27 @@
|
||||
<if test="task_type != null">
|
||||
AND task_type = #{task_type}
|
||||
</if>
|
||||
<if test="task_name != null">
|
||||
<if test="task_name != null and task_name != '' ">
|
||||
AND task_name LIKE CONCAT('%', #{task_name}, '%')
|
||||
</if>
|
||||
<if test="task_creator != null">
|
||||
<if test="task_creator != null and task_creator != '' ">
|
||||
AND task_create_username LIKE CONCAT('%', #{task_creator}, '%')
|
||||
</if>
|
||||
<if test="task_audit_status != null">
|
||||
AND task_audit_status = #{task_audit_status}
|
||||
<if test="audit_status != null">
|
||||
AND task_audit_status = #{audit_status}
|
||||
</if>
|
||||
<if test="task_audit_status != null">
|
||||
AND task_audit_status = #{task_audit_status}
|
||||
</if>
|
||||
<if test="task_act != null">
|
||||
<if test="task_act != null and task_act != '' ">
|
||||
AND task_act LIKE CONCAT('%', #{task_act}, '%')
|
||||
</if>
|
||||
<if test="task_auditor != null">
|
||||
<if test="task_auditor != null and task_auditor != '' ">
|
||||
AND task_audit_username LIKE CONCAT('%', #{task_auditor}, '%')
|
||||
</if>
|
||||
<if test="task_source != null">
|
||||
<if test="task_source != null and task_source != '' ">
|
||||
AND task_source LIKE CONCAT('%', #{task_source}, '%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
LIMIT ${(page - 1) * page_size}, #{page_size}
|
||||
</select>
|
||||
|
||||
@@ -338,7 +336,7 @@
|
||||
</select>
|
||||
<select id="queryTaskTotalNum" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM t_task
|
||||
<if test="rule_name != null">
|
||||
<if test="rule_name != null and creator != '' ">
|
||||
LEFT JOIN t_static_rule ON t_task.task_id = t_static_rule.static_rule_used_task_id
|
||||
LEFT JOIN t_dynamic_rule ON t_task.task_id = t_dynamic_rule.dynamic_rule_used_task_id
|
||||
WHERE
|
||||
@@ -352,22 +350,22 @@
|
||||
<if test="task_type != null">
|
||||
AND task_type = #{task_type}
|
||||
</if>
|
||||
<if test="task_name != null">
|
||||
<if test="task_name != null and task_name != '' ">
|
||||
AND task_name LIKE CONCAT('%', #{task_name}, '%')
|
||||
</if>
|
||||
<if test="task_creator != null">
|
||||
<if test="task_creator != null and task_creator != '' ">
|
||||
AND task_create_username LIKE CONCAT('%', #{task_creator}, '%')
|
||||
</if>
|
||||
<if test="audit_status != null">
|
||||
AND task_audit_status = #{audit_status}
|
||||
</if>
|
||||
<if test="task_act != null">
|
||||
<if test="task_act != null and task_act != '' ">
|
||||
AND task_act LIKE CONCAT('%', #{task_act}, '%')
|
||||
</if>
|
||||
<if test="task_auditor != null">
|
||||
<if test="task_auditor != null and task_auditor != '' ">
|
||||
AND task_audit_username LIKE CONCAT('%', #{task_auditor}, '%')
|
||||
</if>
|
||||
<if test="task_source != null">
|
||||
<if test="task_source != null and task_source != '' ">
|
||||
AND task_source LIKE CONCAT('%', #{task_source}, '%')
|
||||
</if>
|
||||
|
||||
|
||||
@@ -96,13 +96,13 @@
|
||||
<select id="queryTemplates" resultMap="templateMap">
|
||||
SELECT * FROM template_view
|
||||
<where>
|
||||
<if test="source_system != null">
|
||||
<if test="source_system != null and source_system != '' ">
|
||||
AND strategy_template_source_system = #{source_system}
|
||||
</if>
|
||||
<if test="create_username != null">
|
||||
<if test="create_username != null and create_username != '' ">
|
||||
AND strategy_template_create_username = #{create_username}
|
||||
</if>
|
||||
<if test="template_name != null">
|
||||
<if test="template_name != null and template_name != '' ">
|
||||
AND strategy_template_name LIKE CONCAT('%', #{template_name}, '%')
|
||||
</if>
|
||||
<if test="template_id != null">
|
||||
@@ -130,13 +130,13 @@
|
||||
<select id="queryTemplateTotalNum" resultType="java.lang.Integer">
|
||||
SELECT COUNT(strategy_template_id) FROM t_strategy_template
|
||||
<where>
|
||||
<if test="source_system != null">
|
||||
<if test="source_system != null and source_system != '' ">
|
||||
AND strategy_template_source_system = #{source_system}
|
||||
</if>
|
||||
<if test="create_username != null">
|
||||
<if test="create_username != null and create_username != '' ">
|
||||
AND strategy_template_create_username = #{create_username}
|
||||
</if>
|
||||
<if test="template_name != null">
|
||||
<if test="template_name != null and template_name != '' ">
|
||||
AND strategy_template_name LIKE CONCAT('%', #{template_name}, '%')
|
||||
</if>
|
||||
</where>
|
||||
|
||||
@@ -59,19 +59,19 @@
|
||||
select *, INET_NTOA(white_list_ip) as white_list_ip_d
|
||||
from t_white_list
|
||||
<where>
|
||||
<if test="whiteListName != null">
|
||||
<if test="whiteListName != null and whiteListName != '' ">
|
||||
white_list_name like concat('%', #{whiteListName}, '%')
|
||||
</if>
|
||||
<if test="whiteListId != null">
|
||||
and white_list_id = #{whiteListId}
|
||||
</if>
|
||||
<if test="systemName != null">
|
||||
<if test="systemName != null and systemName != '' ">
|
||||
and white_list_system_name like concat('%', #{systemName}, '%')
|
||||
</if>
|
||||
<if test="auditStatus != null">
|
||||
and white_list_audit_status = #{auditStatus}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
<if test="creator != null and creator != '' ">
|
||||
and create_username = #{creator}
|
||||
</if>
|
||||
</where>
|
||||
@@ -231,19 +231,19 @@
|
||||
select COUNT(*)
|
||||
from t_white_list
|
||||
<where>
|
||||
<if test="whiteListName != null">
|
||||
<if test="whiteListName != null and whiteListName != '' ">
|
||||
white_list_name like concat('%', #{whiteListName}, '%')
|
||||
</if>
|
||||
<if test="whiteListId != null">
|
||||
and white_list_id = #{whiteListId}
|
||||
</if>
|
||||
<if test="systemName != null">
|
||||
<if test="systemName != null and systemName != '' ">
|
||||
and white_list_system_name like concat('%', #{systemName}, '%')
|
||||
</if>
|
||||
<if test="auditStatus != null">
|
||||
and white_list_audit_status = #{auditStatus}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
<if test="creator != null and creator != '' ">
|
||||
and create_username = #{creator}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
Reference in New Issue
Block a user