设置定时任务,每月1号0点执行 计算 月均日95值,95带宽值/月
This commit is contained in:
+24
-9
@@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
<result property="creatorName" column="creator_name" />
|
||||
<result property="remark1" column="remark1" />
|
||||
<result property="switchSn" column="switch_sn" />
|
||||
<result property="interfaceName" column="interface_name" />
|
||||
<result property="resourceType" column="resource_type" />
|
||||
<result property="interfaceLinkDeviceType" column="interface_link_device_type" />
|
||||
@@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsNodeBandwidthVo">
|
||||
select id, node_name, hardware_sn, bandwidth_type, bandwidth_result, bandwidth_95_daily, bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, customer_id, customer_name, service_number, uplink_switch, create_time, update_time, creator_id, creator_name, remark1, interface_name, resource_type, interface_link_device_type, effective_bandwidth_95_daily, effective_bandwidth_95_monthly, effective_avg_monthly_bandwidth_95, business_name, business_id from eps_node_bandwidth
|
||||
select id, node_name, hardware_sn, bandwidth_type, bandwidth_result, bandwidth_95_daily, bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, customer_id, customer_name, service_number, uplink_switch, create_time, update_time, creator_id, creator_name, switch_sn, interface_name, resource_type, interface_link_device_type, effective_bandwidth_95_daily, effective_bandwidth_95_monthly, effective_avg_monthly_bandwidth_95, business_name, business_id from eps_node_bandwidth
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsNodeBandwidthList" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
|
||||
@@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="uplinkSwitch != null and uplinkSwitch != ''"> and uplink_switch like concat('%', #{uplinkSwitch}, '%')</if>
|
||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
||||
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
||||
<if test="remark1 != null and remark1 != ''"> and remark1 = #{remark1}</if>
|
||||
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name = #{interfaceName}</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="interfaceLinkDeviceType != null and interfaceLinkDeviceType != ''"> and interface_link_device_type = #{interfaceLinkDeviceType}</if>
|
||||
@@ -92,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
<if test="creatorName != null">creator_name,</if>
|
||||
<if test="remark1 != null">remark1,</if>
|
||||
<if test="switchSn != null">switch_sn,</if>
|
||||
<if test="interfaceName != null">interface_name,</if>
|
||||
<if test="resourceType != null">resource_type,</if>
|
||||
<if test="interfaceLinkDeviceType != null">interface_link_device_type,</if>
|
||||
@@ -119,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
<if test="creatorName != null">#{creatorName},</if>
|
||||
<if test="remark1 != null">#{remark1},</if>
|
||||
<if test="switchSn != null">#{switchSn},</if>
|
||||
<if test="interfaceName != null">#{interfaceName},</if>
|
||||
<if test="resourceType != null">#{resourceType},</if>
|
||||
<if test="interfaceLinkDeviceType != null">#{interfaceLinkDeviceType},</if>
|
||||
@@ -150,7 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
<if test="creatorName != null">creator_name = #{creatorName},</if>
|
||||
<if test="remark1 != null">remark1 = #{remark1},</if>
|
||||
<if test="switchSn != null">switch_sn = #{switchSn},</if>
|
||||
<if test="interfaceName != null">interface_name = #{interfaceName},</if>
|
||||
<if test="resourceType != null">resource_type = #{resourceType},</if>
|
||||
<if test="interfaceLinkDeviceType != null">interface_link_device_type = #{interfaceLinkDeviceType},</if>
|
||||
@@ -174,17 +174,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="calculateAvg" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
|
||||
<select id="calculateAvg" parameterType="EpsNodeBandwidth" resultType="EpsNodeBandwidth">
|
||||
select sum(ifnull(bandwidth_95_daily,0)) bandwidth95Daily,
|
||||
sum(ifnull(effective_bandwidth_95_daily,0)) effectiveBandwidth95Daily
|
||||
from eps_node_bandwidth
|
||||
<where>
|
||||
<if test="createTime != null">
|
||||
and left(create_time,7) = #{createTime}
|
||||
<if test="startTime != null">
|
||||
and create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="monthTime != null">
|
||||
and left(create_time,7) = #{monthTime}
|
||||
</if>
|
||||
<if test="nodeName != '' and nodeName != null">
|
||||
and node_name = #{nodeName}
|
||||
</if>
|
||||
<if test="hardwareSn != '' and hardwareSn != null">
|
||||
and hardware_sn = #{hardwareSn}
|
||||
</if>
|
||||
<if test="switchSn != '' and switchSn != null">
|
||||
and switch_sn = #{switchSn}
|
||||
</if>
|
||||
<if test="interfaceName != '' and interfaceName != null">
|
||||
and interface_name = #{interfaceName}
|
||||
</if>
|
||||
<if test="businessName != '' and businessName != null">
|
||||
and business_name = #{businessName}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user