<?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.TabHaobanSyncErrorLogMapper" >
  <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHaobanSyncErrorLog" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="log_type" property="logType" jdbcType="INTEGER" />
    <result column="task_id" property="taskId" jdbcType="VARCHAR" />
    <result column="data_id" property="dataId" jdbcType="VARCHAR" />
    <result column="data_type" property="dataType" jdbcType="INTEGER" />
    <result column="reason" property="reason" jdbcType="VARCHAR" />
    <result column="wx_enterprise_id" property="wxEnterpriseId" jdbcType="VARCHAR" />
    <result column="gic_enterprise_id" property="gicEnterpriseId" jdbcType="VARCHAR" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, log_type, task_id, data_id, data_type, reason, wx_enterprise_id, gic_enterprise_id, 
    create_time, update_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from tab_haoban_sync_error_log
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from tab_haoban_sync_error_log
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncErrorLog" >
    insert into tab_haoban_sync_error_log (id, log_type, task_id, 
      data_id, data_type, reason, 
      wx_enterprise_id, gic_enterprise_id, create_time, 
      update_time)
    values (#{id,jdbcType=INTEGER}, #{logType,jdbcType=INTEGER}, #{taskId,jdbcType=VARCHAR}, 
      #{dataId,jdbcType=VARCHAR}, #{dataType,jdbcType=INTEGER}, #{reason,jdbcType=VARCHAR}, 
      #{wxEnterpriseId,jdbcType=VARCHAR}, #{gicEnterpriseId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{updateTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncErrorLog" >
    insert into tab_haoban_sync_error_log
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="logType != null" >
        log_type,
      </if>
      <if test="taskId != null" >
        task_id,
      </if>
      <if test="dataId != null" >
        data_id,
      </if>
      <if test="dataType != null" >
        data_type,
      </if>
      <if test="reason != null" >
        reason,
      </if>
      <if test="wxEnterpriseId != null" >
        wx_enterprise_id,
      </if>
      <if test="gicEnterpriseId != null" >
        gic_enterprise_id,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="logType != null" >
        #{logType,jdbcType=INTEGER},
      </if>
      <if test="taskId != null" >
        #{taskId,jdbcType=VARCHAR},
      </if>
      <if test="dataId != null" >
        #{dataId,jdbcType=VARCHAR},
      </if>
      <if test="dataType != null" >
        #{dataType,jdbcType=INTEGER},
      </if>
      <if test="reason != null" >
        #{reason,jdbcType=VARCHAR},
      </if>
      <if test="wxEnterpriseId != null" >
        #{wxEnterpriseId,jdbcType=VARCHAR},
      </if>
      <if test="gicEnterpriseId != null" >
        #{gicEnterpriseId,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncErrorLog" >
    update tab_haoban_sync_error_log
    <set >
      <if test="logType != null" >
        log_type = #{logType,jdbcType=INTEGER},
      </if>
      <if test="taskId != null" >
        task_id = #{taskId,jdbcType=VARCHAR},
      </if>
      <if test="dataId != null" >
        data_id = #{dataId,jdbcType=VARCHAR},
      </if>
      <if test="dataType != null" >
        data_type = #{dataType,jdbcType=INTEGER},
      </if>
      <if test="reason != null" >
        reason = #{reason,jdbcType=VARCHAR},
      </if>
      <if test="wxEnterpriseId != null" >
        wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
      </if>
      <if test="gicEnterpriseId != null" >
        gic_enterprise_id = #{gicEnterpriseId,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanSyncErrorLog" >
    update tab_haoban_sync_error_log
    set log_type = #{logType,jdbcType=INTEGER},
      task_id = #{taskId,jdbcType=VARCHAR},
      data_id = #{dataId,jdbcType=VARCHAR},
      data_type = #{dataType,jdbcType=INTEGER},
      reason = #{reason,jdbcType=VARCHAR},
      wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
      gic_enterprise_id = #{gicEnterpriseId,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>