告警日志、推送消息接口、图形监控排序优化
监控看板相关接口、单点击计数接口开发
This commit is contained in:
+1
@@ -273,6 +273,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="getTrafficListByClientIds" resultType="EpsInitialTrafficData">
|
||||
SELECT
|
||||
CAST(sum(ifnull(in_speed,0)) AS DECIMAL(20,0)) AS inSpeed,
|
||||
CAST(sum(ifnull(out_speed,0)) AS DECIMAL(20,0)) AS outSpeed,
|
||||
create_time AS createTime
|
||||
FROM ${tableName}
|
||||
|
||||
+18
@@ -314,4 +314,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getListByMonitorView" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
|
||||
<include refid="selectEpsNodeBandwidthVo"/>
|
||||
<where>
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="calculationMode != null and calculationMode != ''"> and calculation_mode = #{calculationMode}</if>
|
||||
<if test="bandwidthType != null and bandwidthType != ''"> and bandwidth_type = #{bandwidthType}</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
<if test="clientIds != '' and clientIds != null">
|
||||
and client_id in
|
||||
<foreach collection="clientIds.split(',')" item="clientId" open="(" separator="," close=")">
|
||||
#{clientId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by bandwidth_95_daily asc
|
||||
</select>
|
||||
</mapper>
|
||||
+23
@@ -369,4 +369,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
group by create_time
|
||||
ORDER BY max_speed desc
|
||||
</select>
|
||||
<select id="geSwitchListByMonitorView" parameterType="InitialSwitchInfoDetails" resultType="InitialSwitchInfoDetails">
|
||||
select client_id clientId, name, in_speed inSpeed, out_speed outSpeed, create_time createTime from initial_switch_info_details
|
||||
<where>
|
||||
<if test="startTime != null">
|
||||
and create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="clientIds != '' and clientIds != null">
|
||||
and client_id in
|
||||
<foreach collection="clientIds.split(',')" item="clientId" open="(" separator="," close=")">
|
||||
#{clientId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="interfaceNames != null and interfaceNames != ''">
|
||||
and name in
|
||||
<foreach collection="interfaceNames.split(',')" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.RmMonitorConfigMapper">
|
||||
|
||||
<resultMap type="RmMonitorConfig" id="RmMonitorConfigResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="configName" column="config_name" />
|
||||
<result property="monitorStartTime" column="monitor_start_time" />
|
||||
<result property="resourceType" column="resource_type" />
|
||||
<result property="deployDevice" column="deploy_device" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmMonitorConfigVo">
|
||||
select id, config_name, monitor_start_time, resource_type, deploy_device, create_time, update_time, create_by, update_by from rm_monitor_config
|
||||
</sql>
|
||||
|
||||
<select id="selectRmMonitorConfigList" parameterType="RmMonitorConfig" resultMap="RmMonitorConfigResult">
|
||||
<include refid="selectRmMonitorConfigVo"/>
|
||||
<where>
|
||||
<if test="configName != null and configName != ''"> and config_name = #{configName}</if>
|
||||
<if test="monitorStartTime != null and monitorStartTime != ''"> and monitor_start_time = #{monitorStartTime}</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="deployDevice != null and deployDevice != ''"> and deploy_device = #{deployDevice}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRmMonitorConfigById" parameterType="Long" resultMap="RmMonitorConfigResult">
|
||||
<include refid="selectRmMonitorConfigVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRmMonitorConfig" parameterType="RmMonitorConfig" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rm_monitor_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="configName != null and configName != ''">config_name,</if>
|
||||
<if test="monitorStartTime != null and monitorStartTime != ''">monitor_start_time,</if>
|
||||
<if test="resourceType != null and resourceType != ''">resource_type,</if>
|
||||
<if test="deployDevice != null and deployDevice != ''">deploy_device,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="configName != null and configName != ''">#{configName},</if>
|
||||
<if test="monitorStartTime != null and monitorStartTime != ''">#{monitorStartTime},</if>
|
||||
<if test="resourceType != null and resourceType != ''">#{resourceType},</if>
|
||||
<if test="deployDevice != null and deployDevice != ''">#{deployDevice},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRmMonitorConfig" parameterType="RmMonitorConfig">
|
||||
update rm_monitor_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
||||
<if test="monitorStartTime != null and monitorStartTime != ''">monitor_start_time = #{monitorStartTime},</if>
|
||||
<if test="resourceType != null and resourceType != ''">resource_type = #{resourceType},</if>
|
||||
<if test="deployDevice != null and deployDevice != ''">deploy_device = #{deployDevice},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRmMonitorConfigById" parameterType="Long">
|
||||
delete from rm_monitor_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRmMonitorConfigByIds" parameterType="String">
|
||||
delete from rm_monitor_config where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.SysMenuClickMapper">
|
||||
|
||||
<resultMap type="SysMenuClick" id="SysMenuClickResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="pageRoute" column="page_route" />
|
||||
<result property="pageName" column="page_name" />
|
||||
<result property="clickCount" column="click_count" />
|
||||
<result property="lastClickTime" column="last_click_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysMenuClickVo">
|
||||
select id, page_route, page_name, click_count, last_click_time, create_by, create_time, update_by, update_time, remark from sys_menu_click
|
||||
</sql>
|
||||
|
||||
<select id="selectSysMenuClickList" parameterType="SysMenuClick" resultMap="SysMenuClickResult">
|
||||
<include refid="selectSysMenuClickVo"/>
|
||||
<where>
|
||||
<if test="pageRoute != null and pageRoute != ''"> and page_route = #{pageRoute}</if>
|
||||
<if test="pageName != null and pageName != ''"> and page_name like concat('%', #{pageName}, '%')</if>
|
||||
<if test="clickCount != null "> and click_count = #{clickCount}</if>
|
||||
<if test="lastClickTime != null "> and last_click_time = #{lastClickTime}</if>
|
||||
</where>
|
||||
order by click_count desc
|
||||
limit 8
|
||||
</select>
|
||||
|
||||
<select id="selectSysMenuClickById" parameterType="Long" resultMap="SysMenuClickResult">
|
||||
<include refid="selectSysMenuClickVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysMenuClick" parameterType="SysMenuClick" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_menu_click
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="pageRoute != null and pageRoute != ''">page_route,</if>
|
||||
<if test="pageName != null">page_name,</if>
|
||||
<if test="clickCount != null">click_count,</if>
|
||||
<if test="lastClickTime != null">last_click_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="pageRoute != null and pageRoute != ''">#{pageRoute},</if>
|
||||
<if test="pageName != null">#{pageName},</if>
|
||||
<if test="clickCount != null">#{clickCount},</if>
|
||||
<if test="lastClickTime != null">#{lastClickTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysMenuClick" parameterType="SysMenuClick">
|
||||
update sys_menu_click
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="pageRoute != null and pageRoute != ''">page_route = #{pageRoute},</if>
|
||||
<if test="pageName != null">page_name = #{pageName},</if>
|
||||
<if test="clickCount != null">click_count = #{clickCount},</if>
|
||||
<if test="lastClickTime != null">last_click_time = #{lastClickTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysMenuClickById" parameterType="Long">
|
||||
delete from sys_menu_click where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysMenuClickByIds" parameterType="String">
|
||||
delete from sys_menu_click where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user