Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94ad6d1f5a | ||
|
|
afdeb7116d |
+7
-12
@@ -599,20 +599,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
FROM ${tableName} a
|
FROM ${tableName} a
|
||||||
<!-- 动态关联表 -->
|
<!-- 动态关联表 -->
|
||||||
<if test="mac == null or mac == ''">
|
<if test="mac == null or mac == ''">
|
||||||
INNER JOIN (
|
LEFT JOIN rm_network_interface b ON a.client_id = b.client_id
|
||||||
SELECT
|
|
||||||
a.client_id,ifnull(b.mac_address,a.mac_address) mac_address
|
|
||||||
FROM rm_network_interface a
|
|
||||||
LEFT JOIN rm_network_interface_child b on b.ipv4_address!='' and b.ipv4_address!='N/A'
|
|
||||||
and a.client_id = b.client_id
|
|
||||||
AND a.interface_name = b.parent_interface
|
|
||||||
where
|
|
||||||
(a.bind_ip = 1 OR a.bind_ip = 3)
|
|
||||||
AND a.new_flag = 1 and a.client_id = #{clientId}
|
|
||||||
) b
|
|
||||||
ON a.client_id = b.client_id and a.mac = b.mac_address
|
|
||||||
</if>
|
</if>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="mac == null or mac == ''">
|
||||||
|
and (b.bind_ip = 1 or b.bind_ip = 3)
|
||||||
|
and a.ipV4 IS NOT NULL
|
||||||
|
and a.ipV4 != ''
|
||||||
|
and NOT (a.total_in_speed = 0 and a.total_out_speed = 0)
|
||||||
|
</if>
|
||||||
<if test="serviceSn != '' and serviceSn != null">
|
<if test="serviceSn != '' and serviceSn != null">
|
||||||
and a.service_sn = #{serviceSn}
|
and a.service_sn = #{serviceSn}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user