...
|
...
|
@@ -3,6 +3,7 @@ |
|
|
<mapper namespace="com.monitor.mysql.mapper.HostGroupMapper" >
|
|
|
<resultMap id="BaseResultMap" type="com.model.HostGroup" >
|
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
|
<id column="pid" property="pid" jdbcType="INTEGER" />
|
|
|
<result column="group_name" property="groupName" jdbcType="VARCHAR" />
|
|
|
<result column="tag_type" property="tagType" jdbcType="VARCHAR" />
|
|
|
<result column="descr" property="descr" jdbcType="VARCHAR" />
|
...
|
...
|
@@ -27,15 +28,16 @@ |
|
|
|
|
|
<insert id="insert" parameterType="com.model.HostGroup" >
|
|
|
insert into host_group
|
|
|
(group_name,tag_type, descr,create_time, update_time)
|
|
|
(pid,group_name,tag_type, descr,create_time, update_time)
|
|
|
values
|
|
|
(#{groupName,jdbcType=VARCHAR},#{tagType,jdbcType=VARCHAR},#{descr,jdbcType=VARCHAR}, now(),now())
|
|
|
(#{pid,jdbcType=INTEGER},#{groupName,jdbcType=VARCHAR},#{tagType,jdbcType=VARCHAR},#{descr,jdbcType=VARCHAR}, now(),now())
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.model.HostGroup" >
|
|
|
update host_group
|
|
|
set group_name = #{groupName,jdbcType=VARCHAR},
|
|
|
descr = #{descr,jdbcType=VARCHAR},
|
|
|
pid = #{descr,jdbcType=INTEGER},
|
|
|
tag_type = #{tagType,jdbcType=VARCHAR},
|
|
|
update_time = now()
|
|
|
where id = #{id,jdbcType=INTEGER}
|
...
|
...
|
|