<?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.community.huiju.dao.TaSysMenuImgMapper" >
  <resultMap id="BaseResultMap" type="com.community.huiju.model.TaSysMenuImg" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="ta_menu_id" property="taMenuId" jdbcType="INTEGER" />
    <result column="menu_icon_img" property="menuIconImg" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, ta_menu_id, menu_icon_img
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from ta_sys_menu_img
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from ta_sys_menu_img
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.community.huiju.model.TaSysMenuImg" >
    insert into ta_sys_menu_img (id, ta_menu_id, menu_icon_img
      )
    values (#{id,jdbcType=INTEGER}, #{taMenuId,jdbcType=INTEGER}, #{menuIconImg,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.community.huiju.model.TaSysMenuImg" >
    insert into ta_sys_menu_img
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="taMenuId != null" >
        ta_menu_id,
      </if>
      <if test="menuIconImg != null" >
        menu_icon_img,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="taMenuId != null" >
        #{taMenuId,jdbcType=INTEGER},
      </if>
      <if test="menuIconImg != null" >
        #{menuIconImg,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaSysMenuImg" >
    update ta_sys_menu_img
    <set >
      <if test="taMenuId != null" >
        ta_menu_id = #{taMenuId,jdbcType=INTEGER},
      </if>
      <if test="menuIconImg != null" >
        menu_icon_img = #{menuIconImg,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TaSysMenuImg" >
    update ta_sys_menu_img
    set ta_menu_id = #{taMenuId,jdbcType=INTEGER},
      menu_icon_img = #{menuIconImg,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>

  <select id="selectByMenuId" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from ta_sys_menu_img
    where ta_menu_id = #{id,jdbcType=INTEGER}
  </select>
</mapper>