<?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.community.huiju.dao.TaUserLicenseOrderMapper" >
  <resultMap id="BaseResultMap" type="com.community.huiju.model.TaUserLicenseOrder" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="community_id" property="communityId" jdbcType="INTEGER" />
    <result column="ta_user_id" property="taUserId" jdbcType="INTEGER" />
    <result column="order_number" property="orderNumber" jdbcType="VARCHAR" />
    <result column="order_status" property="orderStatus" jdbcType="VARCHAR" />
    <result column="create_user" property="createUser" jdbcType="INTEGER" />
    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
    <result column="extension_month" property="extensionMonth" jdbcType="INTEGER" />
    <result column="extension_price" property="extensionPrice" jdbcType="VARCHAR" />
    <result column="payment_tel" property="paymentTel" jdbcType="VARCHAR" />
    <result column="payment_name" property="paymentName" jdbcType="VARCHAR" />
    <result column="payment_type" property="paymentType" jdbcType="VARCHAR" />
    <result column="expire_date" property="expireDate" jdbcType="TIMESTAMP" />
    <result column="unit_price" property="unitPrice" jdbcType="VARCHAR" />
    <result column="parking_lot" property="parkingLot" jdbcType="VARCHAR" />
    <result column="license_plate" property="licensePlate" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, community_id, ta_user_id, order_number, order_status, create_user, create_date, 
    update_user, update_date, extension_month, extension_price, payment_tel, payment_name, 
    payment_type, expire_date, unit_price, parking_lot, license_plate
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from ta_user_license_order
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from ta_user_license_order
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.community.huiju.model.TaUserLicenseOrder" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
    insert into ta_user_license_order (id, community_id, ta_user_id, 
      order_number, order_status, create_user, 
      create_date, update_user, update_date, 
      extension_month, extension_price, payment_tel, 
      payment_name, payment_type, expire_date, 
      unit_price, parking_lot, license_plate
      )
    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER}, 
      #{orderNumber,jdbcType=VARCHAR}, #{orderStatus,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, 
      #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}, 
      #{extensionMonth,jdbcType=INTEGER}, #{extensionPrice,jdbcType=VARCHAR}, #{paymentTel,jdbcType=VARCHAR}, 
      #{paymentName,jdbcType=VARCHAR}, #{paymentType,jdbcType=VARCHAR}, #{expireDate,jdbcType=TIMESTAMP}, 
      #{unitPrice,jdbcType=VARCHAR}, #{parkingLot,jdbcType=VARCHAR}, #{licensePlate,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.community.huiju.model.TaUserLicenseOrder" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
    insert into ta_user_license_order
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="communityId != null" >
        community_id,
      </if>
      <if test="taUserId != null" >
        ta_user_id,
      </if>
      <if test="orderNumber != null" >
        order_number,
      </if>
      <if test="orderStatus != null" >
        order_status,
      </if>
      <if test="createUser != null" >
        create_user,
      </if>
      <if test="createDate != null" >
        create_date,
      </if>
      <if test="updateUser != null" >
        update_user,
      </if>
      <if test="updateDate != null" >
        update_date,
      </if>
      <if test="extensionMonth != null" >
        extension_month,
      </if>
      <if test="extensionPrice != null" >
        extension_price,
      </if>
      <if test="paymentTel != null" >
        payment_tel,
      </if>
      <if test="paymentName != null" >
        payment_name,
      </if>
      <if test="paymentType != null" >
        payment_type,
      </if>
      <if test="expireDate != null" >
        expire_date,
      </if>
      <if test="unitPrice != null" >
        unit_price,
      </if>
      <if test="parkingLot != null" >
        parking_lot,
      </if>
      <if test="licensePlate != null" >
        license_plate,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="communityId != null" >
        #{communityId,jdbcType=INTEGER},
      </if>
      <if test="taUserId != null" >
        #{taUserId,jdbcType=INTEGER},
      </if>
      <if test="orderNumber != null" >
        #{orderNumber,jdbcType=VARCHAR},
      </if>
      <if test="orderStatus != null" >
        #{orderStatus,jdbcType=VARCHAR},
      </if>
      <if test="createUser != null" >
        #{createUser,jdbcType=INTEGER},
      </if>
      <if test="createDate != null" >
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUser != null" >
        #{updateUser,jdbcType=INTEGER},
      </if>
      <if test="updateDate != null" >
        #{updateDate,jdbcType=TIMESTAMP},
      </if>
      <if test="extensionMonth != null" >
        #{extensionMonth,jdbcType=INTEGER},
      </if>
      <if test="extensionPrice != null" >
        #{extensionPrice,jdbcType=VARCHAR},
      </if>
      <if test="paymentTel != null" >
        #{paymentTel,jdbcType=VARCHAR},
      </if>
      <if test="paymentName != null" >
        #{paymentName,jdbcType=VARCHAR},
      </if>
      <if test="paymentType != null" >
        #{paymentType,jdbcType=VARCHAR},
      </if>
      <if test="expireDate != null" >
        #{expireDate,jdbcType=TIMESTAMP},
      </if>
      <if test="unitPrice != null" >
        #{unitPrice,jdbcType=VARCHAR},
      </if>
      <if test="parkingLot != null" >
        #{parkingLot,jdbcType=VARCHAR},
      </if>
      <if test="licensePlate != null" >
        #{licensePlate,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaUserLicenseOrder" >
    update ta_user_license_order
    <set >
      <if test="communityId != null" >
        community_id = #{communityId,jdbcType=INTEGER},
      </if>
      <if test="taUserId != null" >
        ta_user_id = #{taUserId,jdbcType=INTEGER},
      </if>
      <if test="orderNumber != null" >
        order_number = #{orderNumber,jdbcType=VARCHAR},
      </if>
      <if test="orderStatus != null" >
        order_status = #{orderStatus,jdbcType=VARCHAR},
      </if>
      <if test="createUser != null" >
        create_user = #{createUser,jdbcType=INTEGER},
      </if>
      <if test="createDate != null" >
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUser != null" >
        update_user = #{updateUser,jdbcType=INTEGER},
      </if>
      <if test="updateDate != null" >
        update_date = #{updateDate,jdbcType=TIMESTAMP},
      </if>
      <if test="extensionMonth != null" >
        extension_month = #{extensionMonth,jdbcType=INTEGER},
      </if>
      <if test="extensionPrice != null" >
        extension_price = #{extensionPrice,jdbcType=VARCHAR},
      </if>
      <if test="paymentTel != null" >
        payment_tel = #{paymentTel,jdbcType=VARCHAR},
      </if>
      <if test="paymentName != null" >
        payment_name = #{paymentName,jdbcType=VARCHAR},
      </if>
      <if test="paymentType != null" >
        payment_type = #{paymentType,jdbcType=VARCHAR},
      </if>
      <if test="expireDate != null" >
        expire_date = #{expireDate,jdbcType=TIMESTAMP},
      </if>
      <if test="unitPrice != null" >
        unit_price = #{unitPrice,jdbcType=VARCHAR},
      </if>
      <if test="parkingLot != null" >
        parking_lot = #{parkingLot,jdbcType=VARCHAR},
      </if>
      <if test="licensePlate != null" >
        license_plate = #{licensePlate,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TaUserLicenseOrder" >
    update ta_user_license_order
    set community_id = #{communityId,jdbcType=INTEGER},
      ta_user_id = #{taUserId,jdbcType=INTEGER},
      order_number = #{orderNumber,jdbcType=VARCHAR},
      order_status = #{orderStatus,jdbcType=VARCHAR},
      create_user = #{createUser,jdbcType=INTEGER},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      update_user = #{updateUser,jdbcType=INTEGER},
      update_date = #{updateDate,jdbcType=TIMESTAMP},
      extension_month = #{extensionMonth,jdbcType=INTEGER},
      extension_price = #{extensionPrice,jdbcType=VARCHAR},
      payment_tel = #{paymentTel,jdbcType=VARCHAR},
      payment_name = #{paymentName,jdbcType=VARCHAR},
      payment_type = #{paymentType,jdbcType=VARCHAR},
      expire_date = #{expireDate,jdbcType=TIMESTAMP},
      unit_price = #{unitPrice,jdbcType=VARCHAR},
      parking_lot = #{parkingLot,jdbcType=VARCHAR},
      license_plate = #{licensePlate,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>