...
|
...
|
@@ -11,7 +11,7 @@ |
|
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, group_name,tag_type,descr, create_time, update_time
|
|
|
id, group_name,tag_type,descr, create_time, update_time,pid
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
...
|
...
|
@@ -37,7 +37,7 @@ |
|
|
update host_group
|
|
|
set group_name = #{groupName,jdbcType=VARCHAR},
|
|
|
descr = #{descr,jdbcType=VARCHAR},
|
|
|
pid = #{descr,jdbcType=INTEGER},
|
|
|
pid = #{pid,jdbcType=INTEGER},
|
|
|
tag_type = #{tagType,jdbcType=VARCHAR},
|
|
|
update_time = now()
|
|
|
where id = #{id,jdbcType=INTEGER}
|
...
|
...
|
@@ -65,8 +65,13 @@ |
|
|
<include refid="Base_Column_List" />
|
|
|
from host_group
|
|
|
where 1=1
|
|
|
<if test="tagType!=null && tagType != ''">
|
|
|
and tag_type = #{tagType,jdbcType=VARCHAR}
|
|
|
<if test="searchContent!=null && searchContent != ''">
|
|
|
and (group_name like CONCAT('%',#{searchContent,jdbcType=VARCHAR},'%')
|
|
|
or
|
|
|
descr like CONCAT('%',#{searchContent,jdbcType=VARCHAR},'%'))
|
|
|
</if>
|
|
|
<if test="tagTypeContent!=null && tagTypeContent != ''">
|
|
|
and tag_type = #{tagTypeContent,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
...
|
...
|
|