<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pcloud.book.pcloudkeyword.dao.impl.PcloudRobotMemoGroupDaoImpl" >
  <resultMap id="BaseResultMap" type="PcloudRobotMemoGroup" >
    <id column="id" property="id" jdbcType="INTEGER" />

    <result column="group_name" property="groupName" jdbcType="VARCHAR" />

  </resultMap>
  <sql id="Base_Column_List" >
    id, group_name
  </sql>

  <insert id="insert" parameterType="PcloudRobotMemoGroup" useGeneratedKeys="true" keyProperty="id">
    insert into pcloud_robot_memo_group (
      group_name

      )
    values (

      #{groupName,jdbcType=VARCHAR}

      )
  </insert>

    <select id="getAllGroup"  resultMap="BaseResultMap">
        select <include refid="Base_Column_List"/>
        from pcloud_robot_memo_group
    </select>

  <update id="updateById" parameterType="map">
    update pcloud_robot_memo_group set group_name=#{groupName}
    where id=#{id}
  </update>

  <delete id="deleteById" parameterType="long">
    delete from pcloud_robot_memo_group where id=#{id}
  </delete>
</mapper>