<?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.gic.haoban.manage.service.dao.mapper.TabHaobanMaidianDictModuleMapper" >
  <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule" >
    <id column="module_id" property="moduleId" jdbcType="VARCHAR" />
    <result column="module_name" property="moduleName" jdbcType="VARCHAR" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
    <result column="status" property="status" jdbcType="INTEGER" />
    <result column="operation_person" property="operationPerson" jdbcType="VARCHAR" />
    <result column="module_data" property="moduleData" jdbcType="VARCHAR" />
    <result column="hide_flag" property="hideFlag" jdbcType="INTEGER" />
    <result column="code" property="code" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    module_id, module_name, create_time, update_time, status, operation_person, module_data, 
    hide_flag, code
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from tab_haoban_maidian_dict_module
    where module_id = #{moduleId,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from tab_haoban_maidian_dict_module
    where module_id = #{moduleId,jdbcType=VARCHAR}
  </delete>
  <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule" >
    insert into tab_haoban_maidian_dict_module (module_id, module_name, create_time, 
      update_time, status, operation_person, 
      module_data, hide_flag, code
      )
    values (#{moduleId,jdbcType=VARCHAR}, #{moduleName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{operationPerson,jdbcType=VARCHAR}, 
      #{moduleData,jdbcType=VARCHAR}, #{hideFlag,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule" >
    insert into tab_haoban_maidian_dict_module
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="moduleId != null" >
        module_id,
      </if>
      <if test="moduleName != null" >
        module_name,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
      <if test="status != null" >
        status,
      </if>
      <if test="operationPerson != null" >
        operation_person,
      </if>
      <if test="moduleData != null" >
        module_data,
      </if>
      <if test="hideFlag != null" >
        hide_flag,
      </if>
      <if test="code != null" >
        code,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="moduleId != null" >
        #{moduleId,jdbcType=VARCHAR},
      </if>
      <if test="moduleName != null" >
        #{moduleName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null" >
        #{status,jdbcType=INTEGER},
      </if>
      <if test="operationPerson != null" >
        #{operationPerson,jdbcType=VARCHAR},
      </if>
      <if test="moduleData != null" >
        #{moduleData,jdbcType=VARCHAR},
      </if>
      <if test="hideFlag != null" >
        #{hideFlag,jdbcType=INTEGER},
      </if>
      <if test="code != null" >
        #{code,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule" >
    update tab_haoban_maidian_dict_module
    <set >
      <if test="moduleName != null" >
        module_name = #{moduleName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="operationPerson != null" >
        operation_person = #{operationPerson,jdbcType=VARCHAR},
      </if>
      <if test="moduleData != null" >
        module_data = #{moduleData,jdbcType=VARCHAR},
      </if>
      <if test="hideFlag != null" >
        hide_flag = #{hideFlag,jdbcType=INTEGER},
      </if>
      <if test="code != null" >
        code = #{code,jdbcType=VARCHAR},
      </if>
    </set>
    where module_id = #{moduleId,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule" >
    update tab_haoban_maidian_dict_module
    set module_name = #{moduleName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      status = #{status,jdbcType=INTEGER},
      operation_person = #{operationPerson,jdbcType=VARCHAR},
      module_data = #{moduleData,jdbcType=VARCHAR},
      hide_flag = #{hideFlag,jdbcType=INTEGER},
      code = #{code,jdbcType=VARCHAR}
    where module_id = #{moduleId,jdbcType=VARCHAR}
  </update>
        <select id="list" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from tab_haoban_maidian_dict_module
    where status =1 
    order by create_time 
  </select>
  
  
</mapper>