|
|
@@ -26,11 +26,15 @@
|
|
|
<if test="infoVo.hostIp != '' and infoVo.hostIp != null">
|
|
|
and t.hostIp LIKE CONCAT('%', #{infoVo.hostIp}, '%' )
|
|
|
</if>
|
|
|
-<!-- <if test="infoVo.mirrorVersion != '' and infoVo.mirrorVersion != null">
|
|
|
- and h.mirror_version LIKE CONCAT('%', #{infoVo.mirrorVersion}, '%' )
|
|
|
- </if>-->
|
|
|
- <if test="infoVo.hostOrg != '' and infoVo.hostOrg != null">
|
|
|
- and h.PATH LIKE CONCAT('%#', #{infoVo.hostOrg}, '#%' )
|
|
|
+ <if test=" infoVo.hostOrg != null ">
|
|
|
+ <choose>
|
|
|
+ <when test=" infoVo.checkSub == true">
|
|
|
+ and h.path like CONCAT('%', #{infoVo.hostOrg}, '%' )
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and h.org_id = #{infoVo.hostOrg}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
</if>
|
|
|
<if test="infoVo.hostName != '' and infoVo.hostName != null">
|
|
|
and t.hostName LIKE CONCAT('%', #{infoVo.hostName}, '%' )
|
|
|
@@ -147,9 +151,6 @@
|
|
|
LEFT JOIN hv_host_org v ON h.id = v.register_code
|
|
|
LEFT JOIN hv_org o ON v.org_id = o.org_id
|
|
|
<where>
|
|
|
- <if test="info.hostOrg != '' and info.hostOrg != null">
|
|
|
- o.IS_DELETED = 0 AND o.PATH LIKE CONCAT('%#', #{info.hostOrg}, '#%' )
|
|
|
- </if>
|
|
|
<if test="info.agentVersion != '' and info.agentVersion != null">
|
|
|
AND h.agentVersion = #{info.agentVersion}
|
|
|
</if>
|
|
|
@@ -162,6 +163,17 @@
|
|
|
<if test="info.hostStatus != '' and info.hostStatus != null">
|
|
|
AND h.hostStatus = #{info.hostStatus}
|
|
|
</if>
|
|
|
+ <if test=" info.hostOrg != null ">
|
|
|
+ v.is_deleted = 0
|
|
|
+ <choose>
|
|
|
+ <when test=" info.checkSub == true">
|
|
|
+ and v.path like CONCAT('%', #{info.hostOrg}, '%' )
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and v.org_id = #{info.hostOrg}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|