pppoe配置增加5个字段。
This commit is contained in:
+6
-1
@@ -26,10 +26,11 @@
|
||||
<result property="newFlag" column="new_flag" />
|
||||
<result property="status" column="status" />
|
||||
<result property="bandwidthResult" column="bandwidth_result" />
|
||||
<result property="netCreateTime" column="net_create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmNetworkInterfaceChildVo">
|
||||
select id, client_id, parent_interface, isp, province, city, public_ip, interface_name, mac_address, interface_type, ipv4_address, ipv6_address, gateway, create_time, update_time, create_by, update_by, bind_ip, new_flag, status, bandwidth_result from rm_network_interface_child
|
||||
select id, client_id, parent_interface, isp, province, city, public_ip, interface_name, mac_address, interface_type, ipv4_address, ipv6_address, gateway, create_time, update_time, create_by, update_by, bind_ip, new_flag, status, bandwidth_result, net_create_time from rm_network_interface_child
|
||||
</sql>
|
||||
|
||||
<select id="selectRmNetworkInterfaceChildList" parameterType="RmNetworkInterfaceChild" resultMap="RmNetworkInterfaceChildResult">
|
||||
@@ -82,6 +83,7 @@
|
||||
<if test="newFlag != null">new_flag,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="bandwidthResult != null">bandwidth_result,</if>
|
||||
<if test="netCreateTime != null">net_create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null">#{clientId},</if>
|
||||
@@ -104,6 +106,7 @@
|
||||
<if test="newFlag != null">#{newFlag},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="bandwidthResult != null">#{bandwidthResult},</if>
|
||||
<if test="netCreateTime != null">#{netCreateTime},</if>
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
@@ -121,6 +124,7 @@
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="bandwidthResult != null">bandwidth_result = #{bandwidthResult},</if>
|
||||
<if test="netCreateTime != null">net_create_time = #{netCreateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -147,6 +151,7 @@
|
||||
<if test="newFlag != null">new_flag = #{newFlag},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="bandwidthResult != null">bandwidth_result = #{bandwidthResult},</if>
|
||||
<if test="netCreateTime != null">net_create_time = #{netCreateTime},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<choose>
|
||||
|
||||
@@ -38,8 +38,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
a.update_time updateTime,
|
||||
a.create_by createBy,
|
||||
a.update_by updateBy,
|
||||
b.interface_name interfaceName,
|
||||
b.status status,
|
||||
b.mac_address macAddress
|
||||
b.mac_address macAddress,
|
||||
b.net_create_time netCreateTime,
|
||||
CASE
|
||||
WHEN b.net_create_time IS NULL THEN NULL
|
||||
ELSE CONCAT(
|
||||
FLOOR((UNIX_TIMESTAMP() - b.net_create_time) / 3600), -- 计算小时
|
||||
'h',
|
||||
LPAD(FLOOR(((UNIX_TIMESTAMP() - b.net_create_time) % 3600) / 60), 2, '0'), -- 计算分钟
|
||||
'm'
|
||||
)
|
||||
END as netRunTime
|
||||
FROM
|
||||
rm_pppoe_config_sub a
|
||||
LEFT JOIN
|
||||
|
||||
Reference in New Issue
Block a user