优化95值计算相关数据查看
This commit is contained in:
+5
-2
@@ -383,7 +383,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
SELECT
|
||||
a.id,
|
||||
GROUP_CONCAT(DISTINCT a.`name` SEPARATOR ',') AS name,
|
||||
a.`mac` AS mac,
|
||||
GROUP_CONCAT(DISTINCT a.`mac` SEPARATOR ',') AS mac,
|
||||
a.`status` AS status,
|
||||
a.`type` AS type,
|
||||
a.`ipV4` AS ipV4,
|
||||
@@ -453,7 +453,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and a.revenue_method = #{revenueMethod}
|
||||
</if>
|
||||
<if test="mac != null and mac != ''">
|
||||
and a.mac = #{mac}
|
||||
and a.mac in
|
||||
<foreach collection="mac.split(',')" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY a.create_time DESC
|
||||
|
||||
+10
@@ -115,4 +115,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getNetNameByRecord" parameterType="EpsMethodChangeRecord" resultMap="EpsMethodChangeRecordResult">
|
||||
<include refid="selectEpsMethodChangeRecordVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
+6
-1
@@ -34,15 +34,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="serverClientId" column="server_client_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="macAddress" column="mac_address" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsNodeBandwidthVo">
|
||||
select id, node_name, hardware_sn, calculation_mode, bandwidth_type, bandwidth_result, bandwidth_95_daily, bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, machine_flow, uplink_switch, create_time, update_time, 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, remark1, create_datetime, client_id, server_client_id, create_by, update_by from eps_node_bandwidth
|
||||
select id, node_name, hardware_sn, calculation_mode, bandwidth_type, bandwidth_result, bandwidth_95_daily, bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, machine_flow, uplink_switch, create_time, update_time, 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, remark1, create_datetime, client_id, server_client_id, create_by, update_by, mac_address from eps_node_bandwidth
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsNodeBandwidthList" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
|
||||
<include refid="selectEpsNodeBandwidthVo"/>
|
||||
<where>
|
||||
<if test="macAddress != null and macAddress != ''"> and mac_address = #{macAddress}</if>
|
||||
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="calculationMode != null and calculationMode != ''"> and calculation_mode = #{calculationMode}</if>
|
||||
@@ -120,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="serverClientId != null">server_client_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="macAddress != null">mac_address,</if>
|
||||
create_time,
|
||||
update_time,
|
||||
</trim>
|
||||
@@ -150,6 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="serverClientId != null">#{serverClientId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="macAddress != null">#{macAddress},</if>
|
||||
<choose>
|
||||
<when test="createTime != null">
|
||||
#{createTime},
|
||||
@@ -200,6 +204,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="serverClientId != null">server_client_id = #{serverClientId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="macAddress != null">mac_address = #{macAddress},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user