...
|
...
|
@@ -141,15 +141,19 @@ |
|
|
<if test="params.hostIp != null && params.hostIp != ''" >
|
|
|
and a.host_ip = #{params.hostIp}
|
|
|
</if>
|
|
|
<if test=" params.tags == 'isNull'" >
|
|
|
and ( ISNULL(a.tags) or trim(a.tags) = "")
|
|
|
</if>
|
|
|
<if test="params.tagsList != null && params.tagsList.size()>0" >
|
|
|
and
|
|
|
<foreach collection="params.tagsList" index="index" item="item" separator="and">
|
|
|
instr(a.tags, #{item}) > 0
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<choose>
|
|
|
<when test="params.onlyShowTagsIsNull != null && params.onlyShowTagsIsNull != '' ">
|
|
|
and ( ISNULL(a.tags) or trim(a.tags) = "")
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<if test="params.tagsList != null && params.tagsList.size()>0" >
|
|
|
and
|
|
|
<foreach collection="params.tagsList" index="index" item="item" separator="and">
|
|
|
instr(a.tags, #{item}) > 0
|
|
|
</foreach>
|
|
|
</if>
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectHostInfosByCodition" resultMap="BaseResultMap">
|
...
|
...
|
@@ -167,15 +171,20 @@ |
|
|
<if test="params.hostIp != null && params.hostIp != ''" >
|
|
|
and a.host_ip = #{params.hostIp}
|
|
|
</if>
|
|
|
<if test=" params.tags == 'isNull'" >
|
|
|
and ( ISNULL(a.tags) or trim(a.tags) = "")
|
|
|
</if>
|
|
|
<if test="params.tagsList != null && params.tagsList.size() > 0" >
|
|
|
and
|
|
|
<foreach collection="params.tagsList" index="index" item="item" separator="and">
|
|
|
|
|
|
<choose>
|
|
|
<when test="params.onlyShowTagsIsNull != null && params.onlyShowTagsIsNull != '' ">
|
|
|
and ( ISNULL(a.tags) or trim(a.tags) = "")
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<if test="params.tagsList != null && params.tagsList.size()>0" >
|
|
|
and
|
|
|
<foreach collection="params.tagsList" index="index" item="item" separator="and">
|
|
|
instr(a.tags, #{item}) > 0
|
|
|
</foreach>
|
|
|
</if>
|
|
|
</if>
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
|
|
|
order by a.create_time desc
|
|
|
limit #{startIndex},#{pageSize}
|
...
|
...
|
|