<?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="org.linlinjava.litemall.db.dao.LitemallOrderMapper">
  <resultMap id="BaseResultMap" type="org.linlinjava.litemall.db.domain.LitemallOrder">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="user_id" jdbcType="INTEGER" property="userId" />
    <result column="order_sn" jdbcType="VARCHAR" property="orderSn" />
    <result column="order_status" jdbcType="SMALLINT" property="orderStatus" />
    <result column="aftersale_status" jdbcType="SMALLINT" property="aftersaleStatus" />
    <result column="consignee" jdbcType="VARCHAR" property="consignee" />
    <result column="mobile" jdbcType="VARCHAR" property="mobile" />
    <result column="address" jdbcType="VARCHAR" property="address" />
    <result column="message" jdbcType="VARCHAR" property="message" />
    <result column="goods_price" jdbcType="DECIMAL" property="goodsPrice" />
    <result column="freight_price" jdbcType="DECIMAL" property="freightPrice" />
    <result column="coupon_price" jdbcType="DECIMAL" property="couponPrice" />
    <result column="integral_price" jdbcType="DECIMAL" property="integralPrice" />
    <result column="groupon_price" jdbcType="DECIMAL" property="grouponPrice" />
    <result column="order_price" jdbcType="DECIMAL" property="orderPrice" />
    <result column="actual_price" jdbcType="DECIMAL" property="actualPrice" />
    <result column="pay_id" jdbcType="VARCHAR" property="payId" />
    <result column="pay_time" jdbcType="TIMESTAMP" property="payTime" />
    <result column="ship_sn" jdbcType="VARCHAR" property="shipSn" />
    <result column="ship_channel" jdbcType="VARCHAR" property="shipChannel" />
    <result column="ship_time" jdbcType="TIMESTAMP" property="shipTime" />
    <result column="refund_amount" jdbcType="DECIMAL" property="refundAmount" />
    <result column="refund_type" jdbcType="VARCHAR" property="refundType" />
    <result column="refund_content" jdbcType="VARCHAR" property="refundContent" />
    <result column="refund_time" jdbcType="TIMESTAMP" property="refundTime" />
    <result column="confirm_time" jdbcType="TIMESTAMP" property="confirmTime" />
    <result column="comments" jdbcType="SMALLINT" property="comments" />
    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
    <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="deleted" jdbcType="BIT" property="deleted" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, user_id, order_sn, order_status, aftersale_status, consignee, mobile, address, 
    message, goods_price, freight_price, coupon_price, integral_price, groupon_price, 
    order_price, actual_price, pay_id, pay_time, ship_sn, ship_channel, ship_time, refund_amount, 
    refund_type, refund_content, refund_time, confirm_time, comments, end_time, add_time, 
    update_time, deleted
  </sql>
  <select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallOrderExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from litemall_order
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="example.distinct">
      distinct
    </if>
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from litemall_order
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
    <if test="example.orderByClause != null">
      order by ${example.orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from litemall_order
    where id = #{id,jdbcType=INTEGER}
  </select>
  <select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from litemall_order
    where id = #{id,jdbcType=INTEGER}
      and deleted = 
    <choose>
      <when test="andLogicalDeleted">
        1
      </when>
      <otherwise>
        0
      </otherwise>
    </choose>
  </select>
  <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from litemall_order
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from litemall_order
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallOrderExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from litemall_order
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="org.linlinjava.litemall.db.domain.LitemallOrder">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into litemall_order (user_id, order_sn, order_status, 
      aftersale_status, consignee, mobile, 
      address, message, goods_price, 
      freight_price, coupon_price, integral_price, 
      groupon_price, order_price, actual_price, 
      pay_id, pay_time, ship_sn, 
      ship_channel, ship_time, refund_amount, 
      refund_type, refund_content, refund_time, 
      confirm_time, comments, end_time, 
      add_time, update_time, deleted
      )
    values (#{userId,jdbcType=INTEGER}, #{orderSn,jdbcType=VARCHAR}, #{orderStatus,jdbcType=SMALLINT}, 
      #{aftersaleStatus,jdbcType=SMALLINT}, #{consignee,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, 
      #{address,jdbcType=VARCHAR}, #{message,jdbcType=VARCHAR}, #{goodsPrice,jdbcType=DECIMAL}, 
      #{freightPrice,jdbcType=DECIMAL}, #{couponPrice,jdbcType=DECIMAL}, #{integralPrice,jdbcType=DECIMAL}, 
      #{grouponPrice,jdbcType=DECIMAL}, #{orderPrice,jdbcType=DECIMAL}, #{actualPrice,jdbcType=DECIMAL}, 
      #{payId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{shipSn,jdbcType=VARCHAR}, 
      #{shipChannel,jdbcType=VARCHAR}, #{shipTime,jdbcType=TIMESTAMP}, #{refundAmount,jdbcType=DECIMAL}, 
      #{refundType,jdbcType=VARCHAR}, #{refundContent,jdbcType=VARCHAR}, #{refundTime,jdbcType=TIMESTAMP}, 
      #{confirmTime,jdbcType=TIMESTAMP}, #{comments,jdbcType=SMALLINT}, #{endTime,jdbcType=TIMESTAMP}, 
      #{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}
      )
  </insert>
  <insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallOrder">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into litemall_order
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="userId != null">
        user_id,
      </if>
      <if test="orderSn != null">
        order_sn,
      </if>
      <if test="orderStatus != null">
        order_status,
      </if>
      <if test="aftersaleStatus != null">
        aftersale_status,
      </if>
      <if test="consignee != null">
        consignee,
      </if>
      <if test="mobile != null">
        mobile,
      </if>
      <if test="address != null">
        address,
      </if>
      <if test="message != null">
        message,
      </if>
      <if test="goodsPrice != null">
        goods_price,
      </if>
      <if test="freightPrice != null">
        freight_price,
      </if>
      <if test="couponPrice != null">
        coupon_price,
      </if>
      <if test="integralPrice != null">
        integral_price,
      </if>
      <if test="grouponPrice != null">
        groupon_price,
      </if>
      <if test="orderPrice != null">
        order_price,
      </if>
      <if test="actualPrice != null">
        actual_price,
      </if>
      <if test="payId != null">
        pay_id,
      </if>
      <if test="payTime != null">
        pay_time,
      </if>
      <if test="shipSn != null">
        ship_sn,
      </if>
      <if test="shipChannel != null">
        ship_channel,
      </if>
      <if test="shipTime != null">
        ship_time,
      </if>
      <if test="refundAmount != null">
        refund_amount,
      </if>
      <if test="refundType != null">
        refund_type,
      </if>
      <if test="refundContent != null">
        refund_content,
      </if>
      <if test="refundTime != null">
        refund_time,
      </if>
      <if test="confirmTime != null">
        confirm_time,
      </if>
      <if test="comments != null">
        comments,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="addTime != null">
        add_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="userId != null">
        #{userId,jdbcType=INTEGER},
      </if>
      <if test="orderSn != null">
        #{orderSn,jdbcType=VARCHAR},
      </if>
      <if test="orderStatus != null">
        #{orderStatus,jdbcType=SMALLINT},
      </if>
      <if test="aftersaleStatus != null">
        #{aftersaleStatus,jdbcType=SMALLINT},
      </if>
      <if test="consignee != null">
        #{consignee,jdbcType=VARCHAR},
      </if>
      <if test="mobile != null">
        #{mobile,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
      <if test="message != null">
        #{message,jdbcType=VARCHAR},
      </if>
      <if test="goodsPrice != null">
        #{goodsPrice,jdbcType=DECIMAL},
      </if>
      <if test="freightPrice != null">
        #{freightPrice,jdbcType=DECIMAL},
      </if>
      <if test="couponPrice != null">
        #{couponPrice,jdbcType=DECIMAL},
      </if>
      <if test="integralPrice != null">
        #{integralPrice,jdbcType=DECIMAL},
      </if>
      <if test="grouponPrice != null">
        #{grouponPrice,jdbcType=DECIMAL},
      </if>
      <if test="orderPrice != null">
        #{orderPrice,jdbcType=DECIMAL},
      </if>
      <if test="actualPrice != null">
        #{actualPrice,jdbcType=DECIMAL},
      </if>
      <if test="payId != null">
        #{payId,jdbcType=VARCHAR},
      </if>
      <if test="payTime != null">
        #{payTime,jdbcType=TIMESTAMP},
      </if>
      <if test="shipSn != null">
        #{shipSn,jdbcType=VARCHAR},
      </if>
      <if test="shipChannel != null">
        #{shipChannel,jdbcType=VARCHAR},
      </if>
      <if test="shipTime != null">
        #{shipTime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundAmount != null">
        #{refundAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundType != null">
        #{refundType,jdbcType=VARCHAR},
      </if>
      <if test="refundContent != null">
        #{refundContent,jdbcType=VARCHAR},
      </if>
      <if test="refundTime != null">
        #{refundTime,jdbcType=TIMESTAMP},
      </if>
      <if test="confirmTime != null">
        #{confirmTime,jdbcType=TIMESTAMP},
      </if>
      <if test="comments != null">
        #{comments,jdbcType=SMALLINT},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="addTime != null">
        #{addTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=BIT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallOrderExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from litemall_order
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update litemall_order
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.userId != null">
        user_id = #{record.userId,jdbcType=INTEGER},
      </if>
      <if test="record.orderSn != null">
        order_sn = #{record.orderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.orderStatus != null">
        order_status = #{record.orderStatus,jdbcType=SMALLINT},
      </if>
      <if test="record.aftersaleStatus != null">
        aftersale_status = #{record.aftersaleStatus,jdbcType=SMALLINT},
      </if>
      <if test="record.consignee != null">
        consignee = #{record.consignee,jdbcType=VARCHAR},
      </if>
      <if test="record.mobile != null">
        mobile = #{record.mobile,jdbcType=VARCHAR},
      </if>
      <if test="record.address != null">
        address = #{record.address,jdbcType=VARCHAR},
      </if>
      <if test="record.message != null">
        message = #{record.message,jdbcType=VARCHAR},
      </if>
      <if test="record.goodsPrice != null">
        goods_price = #{record.goodsPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.freightPrice != null">
        freight_price = #{record.freightPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.couponPrice != null">
        coupon_price = #{record.couponPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.integralPrice != null">
        integral_price = #{record.integralPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.grouponPrice != null">
        groupon_price = #{record.grouponPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.orderPrice != null">
        order_price = #{record.orderPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.actualPrice != null">
        actual_price = #{record.actualPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.payId != null">
        pay_id = #{record.payId,jdbcType=VARCHAR},
      </if>
      <if test="record.payTime != null">
        pay_time = #{record.payTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.shipSn != null">
        ship_sn = #{record.shipSn,jdbcType=VARCHAR},
      </if>
      <if test="record.shipChannel != null">
        ship_channel = #{record.shipChannel,jdbcType=VARCHAR},
      </if>
      <if test="record.shipTime != null">
        ship_time = #{record.shipTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.refundAmount != null">
        refund_amount = #{record.refundAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.refundType != null">
        refund_type = #{record.refundType,jdbcType=VARCHAR},
      </if>
      <if test="record.refundContent != null">
        refund_content = #{record.refundContent,jdbcType=VARCHAR},
      </if>
      <if test="record.refundTime != null">
        refund_time = #{record.refundTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.confirmTime != null">
        confirm_time = #{record.confirmTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.comments != null">
        comments = #{record.comments,jdbcType=SMALLINT},
      </if>
      <if test="record.endTime != null">
        end_time = #{record.endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.addTime != null">
        add_time = #{record.addTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.deleted != null">
        deleted = #{record.deleted,jdbcType=BIT},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update litemall_order
    set id = #{record.id,jdbcType=INTEGER},
      user_id = #{record.userId,jdbcType=INTEGER},
      order_sn = #{record.orderSn,jdbcType=VARCHAR},
      order_status = #{record.orderStatus,jdbcType=SMALLINT},
      aftersale_status = #{record.aftersaleStatus,jdbcType=SMALLINT},
      consignee = #{record.consignee,jdbcType=VARCHAR},
      mobile = #{record.mobile,jdbcType=VARCHAR},
      address = #{record.address,jdbcType=VARCHAR},
      message = #{record.message,jdbcType=VARCHAR},
      goods_price = #{record.goodsPrice,jdbcType=DECIMAL},
      freight_price = #{record.freightPrice,jdbcType=DECIMAL},
      coupon_price = #{record.couponPrice,jdbcType=DECIMAL},
      integral_price = #{record.integralPrice,jdbcType=DECIMAL},
      groupon_price = #{record.grouponPrice,jdbcType=DECIMAL},
      order_price = #{record.orderPrice,jdbcType=DECIMAL},
      actual_price = #{record.actualPrice,jdbcType=DECIMAL},
      pay_id = #{record.payId,jdbcType=VARCHAR},
      pay_time = #{record.payTime,jdbcType=TIMESTAMP},
      ship_sn = #{record.shipSn,jdbcType=VARCHAR},
      ship_channel = #{record.shipChannel,jdbcType=VARCHAR},
      ship_time = #{record.shipTime,jdbcType=TIMESTAMP},
      refund_amount = #{record.refundAmount,jdbcType=DECIMAL},
      refund_type = #{record.refundType,jdbcType=VARCHAR},
      refund_content = #{record.refundContent,jdbcType=VARCHAR},
      refund_time = #{record.refundTime,jdbcType=TIMESTAMP},
      confirm_time = #{record.confirmTime,jdbcType=TIMESTAMP},
      comments = #{record.comments,jdbcType=SMALLINT},
      end_time = #{record.endTime,jdbcType=TIMESTAMP},
      add_time = #{record.addTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      deleted = #{record.deleted,jdbcType=BIT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="org.linlinjava.litemall.db.domain.LitemallOrder">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update litemall_order
    <set>
      <if test="userId != null">
        user_id = #{userId,jdbcType=INTEGER},
      </if>
      <if test="orderSn != null">
        order_sn = #{orderSn,jdbcType=VARCHAR},
      </if>
      <if test="orderStatus != null">
        order_status = #{orderStatus,jdbcType=SMALLINT},
      </if>
      <if test="aftersaleStatus != null">
        aftersale_status = #{aftersaleStatus,jdbcType=SMALLINT},
      </if>
      <if test="consignee != null">
        consignee = #{consignee,jdbcType=VARCHAR},
      </if>
      <if test="mobile != null">
        mobile = #{mobile,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        address = #{address,jdbcType=VARCHAR},
      </if>
      <if test="message != null">
        message = #{message,jdbcType=VARCHAR},
      </if>
      <if test="goodsPrice != null">
        goods_price = #{goodsPrice,jdbcType=DECIMAL},
      </if>
      <if test="freightPrice != null">
        freight_price = #{freightPrice,jdbcType=DECIMAL},
      </if>
      <if test="couponPrice != null">
        coupon_price = #{couponPrice,jdbcType=DECIMAL},
      </if>
      <if test="integralPrice != null">
        integral_price = #{integralPrice,jdbcType=DECIMAL},
      </if>
      <if test="grouponPrice != null">
        groupon_price = #{grouponPrice,jdbcType=DECIMAL},
      </if>
      <if test="orderPrice != null">
        order_price = #{orderPrice,jdbcType=DECIMAL},
      </if>
      <if test="actualPrice != null">
        actual_price = #{actualPrice,jdbcType=DECIMAL},
      </if>
      <if test="payId != null">
        pay_id = #{payId,jdbcType=VARCHAR},
      </if>
      <if test="payTime != null">
        pay_time = #{payTime,jdbcType=TIMESTAMP},
      </if>
      <if test="shipSn != null">
        ship_sn = #{shipSn,jdbcType=VARCHAR},
      </if>
      <if test="shipChannel != null">
        ship_channel = #{shipChannel,jdbcType=VARCHAR},
      </if>
      <if test="shipTime != null">
        ship_time = #{shipTime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundAmount != null">
        refund_amount = #{refundAmount,jdbcType=DECIMAL},
      </if>
      <if test="refundType != null">
        refund_type = #{refundType,jdbcType=VARCHAR},
      </if>
      <if test="refundContent != null">
        refund_content = #{refundContent,jdbcType=VARCHAR},
      </if>
      <if test="refundTime != null">
        refund_time = #{refundTime,jdbcType=TIMESTAMP},
      </if>
      <if test="confirmTime != null">
        confirm_time = #{confirmTime,jdbcType=TIMESTAMP},
      </if>
      <if test="comments != null">
        comments = #{comments,jdbcType=SMALLINT},
      </if>
      <if test="endTime != null">
        end_time = #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="addTime != null">
        add_time = #{addTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=BIT},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="org.linlinjava.litemall.db.domain.LitemallOrder">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update litemall_order
    set user_id = #{userId,jdbcType=INTEGER},
      order_sn = #{orderSn,jdbcType=VARCHAR},
      order_status = #{orderStatus,jdbcType=SMALLINT},
      aftersale_status = #{aftersaleStatus,jdbcType=SMALLINT},
      consignee = #{consignee,jdbcType=VARCHAR},
      mobile = #{mobile,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR},
      message = #{message,jdbcType=VARCHAR},
      goods_price = #{goodsPrice,jdbcType=DECIMAL},
      freight_price = #{freightPrice,jdbcType=DECIMAL},
      coupon_price = #{couponPrice,jdbcType=DECIMAL},
      integral_price = #{integralPrice,jdbcType=DECIMAL},
      groupon_price = #{grouponPrice,jdbcType=DECIMAL},
      order_price = #{orderPrice,jdbcType=DECIMAL},
      actual_price = #{actualPrice,jdbcType=DECIMAL},
      pay_id = #{payId,jdbcType=VARCHAR},
      pay_time = #{payTime,jdbcType=TIMESTAMP},
      ship_sn = #{shipSn,jdbcType=VARCHAR},
      ship_channel = #{shipChannel,jdbcType=VARCHAR},
      ship_time = #{shipTime,jdbcType=TIMESTAMP},
      refund_amount = #{refundAmount,jdbcType=DECIMAL},
      refund_type = #{refundType,jdbcType=VARCHAR},
      refund_content = #{refundContent,jdbcType=VARCHAR},
      refund_time = #{refundTime,jdbcType=TIMESTAMP},
      confirm_time = #{confirmTime,jdbcType=TIMESTAMP},
      comments = #{comments,jdbcType=SMALLINT},
      end_time = #{endTime,jdbcType=TIMESTAMP},
      add_time = #{addTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      deleted = #{deleted,jdbcType=BIT}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <select id="selectOneByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallOrderExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <include refid="Base_Column_List" />
    from litemall_order
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>
  <select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.aliasedEscapedColumnName}
        </foreach>
      </when>
      <otherwise>
        <include refid="Base_Column_List" />
      </otherwise>
    </choose>
    from litemall_order
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
    <if test="example.orderByClause != null">
      order by ${example.orderByClause}
    </if>
    limit 1
  </select>
  <update id="logicalDeleteByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update litemall_order set deleted = 1
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update litemall_order set deleted = 1
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>