<?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.chaozhanggui.dao.system.dao.TbPlussRoleMenuInfoMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussRoleMenuInfo">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="roleId" jdbcType="BIGINT" property="roleid" />
    <result column="menuId" jdbcType="BIGINT" property="menuid" />
  </resultMap>
  <sql id="Base_Column_List">
    id, roleId, menuId
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_role_menu_info
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tb_pluss_role_menu_info
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRoleMenuInfo">
    insert into tb_pluss_role_menu_info (id, roleId, menuId
      )
    values (#{id,jdbcType=BIGINT}, #{roleid,jdbcType=BIGINT}, #{menuid,jdbcType=BIGINT}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRoleMenuInfo">
    insert into tb_pluss_role_menu_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="roleid != null">
        roleId,
      </if>
      <if test="menuid != null">
        menuId,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="roleid != null">
        #{roleid,jdbcType=BIGINT},
      </if>
      <if test="menuid != null">
        #{menuid,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRoleMenuInfo">
    update tb_pluss_role_menu_info
    <set>
      <if test="roleid != null">
        roleId = #{roleid,jdbcType=BIGINT},
      </if>
      <if test="menuid != null">
        menuId = #{menuid,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRoleMenuInfo">
    update tb_pluss_role_menu_info
    set roleId = #{roleid,jdbcType=BIGINT},
      menuId = #{menuid,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>