<?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.goafanti.common.dao.TOrderHighTechMapper">
  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderHighTech">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
    <result column="knowledge_services" jdbcType="INTEGER" property="knowledgeServices" />
    <result column="audit_services" jdbcType="INTEGER" property="auditServices" />
    <result column="add_deduction_services" jdbcType="INTEGER" property="addDeductionServices" />
    <result column="knowledge_other" jdbcType="VARCHAR" property="knowledgeOther" />
    <result column="audit_other" jdbcType="VARCHAR" property="auditOther" />
    <result column="add_deduction_other" jdbcType="VARCHAR" property="addDeductionOther" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, order_no, knowledge_services, audit_services, add_deduction_services, knowledge_other,
    audit_other, add_deduction_other, create_time
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from t_order_high_tech
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from t_order_high_tech
    where id = #{id,jdbcType=INTEGER}
  </delete>

    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderHighTech" useGeneratedKeys="true">
    insert into t_order_high_tech (order_no, knowledge_services, audit_services,
      add_deduction_services, knowledge_other, audit_other,
      add_deduction_other, create_time)
    values (#{orderNo,jdbcType=VARCHAR}, #{knowledgeServices,jdbcType=INTEGER}, #{auditServices,jdbcType=INTEGER},
      #{addDeductionServices,jdbcType=INTEGER}, #{knowledgeOther,jdbcType=VARCHAR}, #{auditOther,jdbcType=VARCHAR},
      #{addDeductionOther,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderHighTech" useGeneratedKeys="true">
    insert into t_order_high_tech
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="orderNo != null">
        order_no,
      </if>
      <if test="knowledgeServices != null">
        knowledge_services,
      </if>
      <if test="auditServices != null">
        audit_services,
      </if>
      <if test="addDeductionServices != null">
        add_deduction_services,
      </if>
      <if test="knowledgeOther != null">
        knowledge_other,
      </if>
      <if test="auditOther != null">
        audit_other,
      </if>
      <if test="addDeductionOther != null">
        add_deduction_other,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="orderNo != null">
        #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="knowledgeServices != null">
        #{knowledgeServices,jdbcType=INTEGER},
      </if>
      <if test="auditServices != null">
        #{auditServices,jdbcType=INTEGER},
      </if>
      <if test="addDeductionServices != null">
        #{addDeductionServices,jdbcType=INTEGER},
      </if>
      <if test="knowledgeOther != null">
        #{knowledgeOther,jdbcType=VARCHAR},
      </if>
      <if test="auditOther != null">
        #{auditOther,jdbcType=VARCHAR},
      </if>
      <if test="addDeductionOther != null">
        #{addDeductionOther,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderHighTech">
    update t_order_high_tech
    <set>
      <if test="orderNo != null">
        order_no = #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="knowledgeServices != null">
        knowledge_services = #{knowledgeServices,jdbcType=INTEGER},
      </if>
      <if test="auditServices != null">
        audit_services = #{auditServices,jdbcType=INTEGER},
      </if>
      <if test="addDeductionServices != null">
        add_deduction_services = #{addDeductionServices,jdbcType=INTEGER},
      </if>
      <if test="knowledgeOther != null">
        knowledge_other = #{knowledgeOther,jdbcType=VARCHAR},
      </if>
      <if test="auditOther != null">
        audit_other = #{auditOther,jdbcType=VARCHAR},
      </if>
      <if test="addDeductionOther != null">
        add_deduction_other = #{addDeductionOther,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderHighTech">
    update t_order_high_tech
    set order_no = #{orderNo,jdbcType=VARCHAR},
    knowledge_services = #{knowledgeServices,jdbcType=INTEGER},
    audit_services = #{auditServices,jdbcType=INTEGER},
    add_deduction_services = #{addDeductionServices,jdbcType=INTEGER},
    knowledge_other = #{knowledgeOther,jdbcType=VARCHAR},
    audit_other = #{auditOther,jdbcType=VARCHAR},
    add_deduction_other = #{addDeductionOther,jdbcType=VARCHAR},
    create_time = #{createTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>

  <update id="updateByOrder" parameterType="com.goafanti.common.model.TOrderHighTech">
    update t_order_high_tech
    set
    knowledge_services = #{knowledgeServices,jdbcType=INTEGER},
    audit_services = #{auditServices,jdbcType=INTEGER},
    add_deduction_services = #{addDeductionServices,jdbcType=INTEGER},
    knowledge_other = #{knowledgeOther,jdbcType=VARCHAR},
    audit_other = #{auditOther,jdbcType=VARCHAR},
    add_deduction_other = #{addDeductionOther,jdbcType=VARCHAR},
    create_time = #{createTime,jdbcType=TIMESTAMP}
    where order_no = #{orderNo,jdbcType=VARCHAR}
  </update>

  <delete id="deleteByOrderNo">
    delete from t_order_high_tech
    where order_no = #{orderNo,jdbcType=VARCHAR}
  </delete>
</mapper>
