Authored by mlge

主机管理---标签 单选更改为 多选

... ... @@ -3,6 +3,8 @@ package com.monitor.model.request;
import com.monitor.model.page.PageRequest;
import lombok.Data;
import java.util.ArrayList;
/**
* Created by yoho on 2016/6/14.
*/
... ... @@ -19,4 +21,6 @@ public class HostInfoReq extends PageRequest {
private String tags;
private ArrayList<String> tagsList;
}
... ...
... ... @@ -141,8 +141,11 @@
<if test="params.hostIp != null &amp;&amp; params.hostIp != ''" >
and a.host_ip = #{params.hostIp}
</if>
<if test="params.tags != null &amp;&amp; params.tags != ''" >
and instr(a.tags, #{params.tags}) &gt; 0
<if test="params.tagsList != null &amp;&amp; params.tagsList != ''" >
and
<foreach collection="params.tagsList" index="index" item="item" separator="and">
instr(a.tags, #{item}) &gt; 0
</foreach>
</if>
</select>
... ... @@ -161,9 +164,13 @@
<if test="params.hostIp != null &amp;&amp; params.hostIp != ''" >
and a.host_ip = #{params.hostIp}
</if>
<if test="params.tags != null &amp;&amp; params.tags != ''" >
and instr(a.tags, #{params.tags}) &gt; 0
<if test="params.tagsList != null &amp;&amp; params.tagsList != ''" >
and
<foreach collection="params.tagsList" index="index" item="item" separator="and">
instr(a.tags, #{item}) &gt; 0
</foreach>
</if>
order by a.create_time desc
limit #{startIndex},#{pageSize}
</select>
... ...