<?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.manage.dao.Power_MenuMapper">
  <resultMap id="BaseResultMap" type="com.manage.entity.Power_Menu">
    <id column="menu_id" jdbcType="INTEGER" property="menuId" />
    <result column="menu_name" jdbcType="VARCHAR" property="menuName" />
    <result column="menu_icon" jdbcType="VARCHAR" property="menuIcon" />
    <result column="menu_url" jdbcType="VARCHAR" property="menuUrl" />
    <result column="menu_desc" jdbcType="VARCHAR" property="menuDesc" />
    <result column="method" jdbcType="VARCHAR" property="method" />
    <result column="method_type" jdbcType="VARCHAR" property="methodType" />
    <result column="sys_id" jdbcType="INTEGER" property="sysId" />
    <result column="parent_id" jdbcType="INTEGER" property="parentId" />
    <result column="sort" jdbcType="INTEGER" property="sort" />
    <result column="effective" jdbcType="INTEGER" property="effective" />
    <result column="create_date" jdbcType="CHAR" property="createDate" />
    <result column="creater" jdbcType="VARCHAR" property="creater" />
    <result column="update_date" jdbcType="CHAR" property="updateDate" />
    <result column="updater" jdbcType="VARCHAR" property="updater" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </resultMap>
  <sql id="Base_Column_List">
    menu_id, menu_name, menu_icon, menu_url, menu_desc, method, method_type, sys_id, 
    parent_id, sort, effective, create_date, creater, update_date, updater, remark
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from power_menu
    where menu_id = #{menuId,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from power_menu
    where menu_id = #{menuId,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.manage.entity.Power_Menu">
    insert into power_menu (menu_id, menu_name, menu_icon, 
      menu_url, menu_desc, method, 
      method_type, sys_id, parent_id, 
      sort, effective, create_date, 
      creater, update_date, updater, 
      remark)
    values (#{menuId,jdbcType=INTEGER}, #{menuName,jdbcType=VARCHAR}, #{menuIcon,jdbcType=VARCHAR}, 
      #{menuUrl,jdbcType=VARCHAR}, #{menuDesc,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR}, 
      #{methodType,jdbcType=VARCHAR}, #{sysId,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER}, 
      #{sort,jdbcType=INTEGER}, #{effective,jdbcType=INTEGER}, #{createDate,jdbcType=CHAR}, 
      #{creater,jdbcType=VARCHAR}, #{updateDate,jdbcType=CHAR}, #{updater,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.manage.entity.Power_Menu">
    insert into power_menu
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="menuId != null">
        menu_id,
      </if>
      <if test="menuName != null">
        menu_name,
      </if>
      <if test="menuIcon != null">
        menu_icon,
      </if>
      <if test="menuUrl != null">
        menu_url,
      </if>
      <if test="menuDesc != null">
        menu_desc,
      </if>
      <if test="method != null">
        method,
      </if>
      <if test="methodType != null">
        method_type,
      </if>
      <if test="sysId != null">
        sys_id,
      </if>
      <if test="parentId != null">
        parent_id,
      </if>
      <if test="sort != null">
        sort,
      </if>
      <if test="effective != null">
        effective,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="creater != null">
        creater,
      </if>
      <if test="updateDate != null">
        update_date,
      </if>
      <if test="updater != null">
        updater,
      </if>
      <if test="remark != null">
        remark,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="menuId != null">
        #{menuId,jdbcType=INTEGER},
      </if>
      <if test="menuName != null">
        #{menuName,jdbcType=VARCHAR},
      </if>
      <if test="menuIcon != null">
        #{menuIcon,jdbcType=VARCHAR},
      </if>
      <if test="menuUrl != null">
        #{menuUrl,jdbcType=VARCHAR},
      </if>
      <if test="menuDesc != null">
        #{menuDesc,jdbcType=VARCHAR},
      </if>
      <if test="method != null">
        #{method,jdbcType=VARCHAR},
      </if>
      <if test="methodType != null">
        #{methodType,jdbcType=VARCHAR},
      </if>
      <if test="sysId != null">
        #{sysId,jdbcType=INTEGER},
      </if>
      <if test="parentId != null">
        #{parentId,jdbcType=INTEGER},
      </if>
      <if test="sort != null">
        #{sort,jdbcType=INTEGER},
      </if>
      <if test="effective != null">
        #{effective,jdbcType=INTEGER},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=CHAR},
      </if>
      <if test="creater != null">
        #{creater,jdbcType=VARCHAR},
      </if>
      <if test="updateDate != null">
        #{updateDate,jdbcType=CHAR},
      </if>
      <if test="updater != null">
        #{updater,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.manage.entity.Power_Menu">
    update power_menu
    <set>
      <if test="menuName != null">
        menu_name = #{menuName,jdbcType=VARCHAR},
      </if>
      <if test="menuIcon != null">
        menu_icon = #{menuIcon,jdbcType=VARCHAR},
      </if>
      <if test="menuUrl != null">
        menu_url = #{menuUrl,jdbcType=VARCHAR},
      </if>
      <if test="menuDesc != null">
        menu_desc = #{menuDesc,jdbcType=VARCHAR},
      </if>
      <if test="method != null">
        method = #{method,jdbcType=VARCHAR},
      </if>
      <if test="methodType != null">
        method_type = #{methodType,jdbcType=VARCHAR},
      </if>
      <if test="sysId != null">
        sys_id = #{sysId,jdbcType=INTEGER},
      </if>
      <if test="parentId != null">
        parent_id = #{parentId,jdbcType=INTEGER},
      </if>
      <if test="sort != null">
        sort = #{sort,jdbcType=INTEGER},
      </if>
      <if test="effective != null">
        effective = #{effective,jdbcType=INTEGER},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=CHAR},
      </if>
      <if test="creater != null">
        creater = #{creater,jdbcType=VARCHAR},
      </if>
      <if test="updateDate != null">
        update_date = #{updateDate,jdbcType=CHAR},
      </if>
      <if test="updater != null">
        updater = #{updater,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
    where menu_id = #{menuId,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.manage.entity.Power_Menu">
    update power_menu
    set menu_name = #{menuName,jdbcType=VARCHAR},
      menu_icon = #{menuIcon,jdbcType=VARCHAR},
      menu_url = #{menuUrl,jdbcType=VARCHAR},
      menu_desc = #{menuDesc,jdbcType=VARCHAR},
      method = #{method,jdbcType=VARCHAR},
      method_type = #{methodType,jdbcType=VARCHAR},
      sys_id = #{sysId,jdbcType=INTEGER},
      parent_id = #{parentId,jdbcType=INTEGER},
      sort = #{sort,jdbcType=INTEGER},
      effective = #{effective,jdbcType=INTEGER},
      create_date = #{createDate,jdbcType=CHAR},
      creater = #{creater,jdbcType=VARCHAR},
      update_date = #{updateDate,jdbcType=CHAR},
      updater = #{updater,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR}
    where menu_id = #{menuId,jdbcType=INTEGER}
  </update>
</mapper>