<?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="consignee" jdbcType="VARCHAR" property="consignee" />
    <result column="mobile" jdbcType="VARCHAR" property="mobile" />
    <result column="address" jdbcType="VARCHAR" property="address" />
    <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="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_status" jdbcType="SMALLINT" property="payStatus" />
    <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_start_time" jdbcType="TIMESTAMP" property="shipStartTime" />
    <result column="ship_end_time" jdbcType="TIMESTAMP" property="shipEndTime" />
    <result column="confirm_time" jdbcType="TIMESTAMP" property="confirmTime" />
    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
    <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
    <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, consignee, mobile, address, goods_price, freight_price, 
    coupon_price, integral_price, order_price, actual_price, pay_id, pay_status, pay_time, 
    ship_sn, ship_channel, ship_start_time, ship_end_time, confirm_time, end_time, add_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.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <if test="example.distinct">
      distinct
    </if>
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.value}
        </foreach>
      </when>
      <otherwise>
        id, user_id, order_sn, order_status, consignee, mobile, address, goods_price, freight_price, 
          coupon_price, integral_price, order_price, actual_price, pay_id, pay_status, pay_time, 
          ship_sn, ship_channel, ship_start_time, ship_end_time, confirm_time, end_time, 
          add_time, deleted
      </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.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    <!--
      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.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.value}
        </foreach>
      </when>
      <otherwise>
        id, user_id, order_sn, order_status, consignee, mobile, address, goods_price, freight_price, 
          coupon_price, integral_price, order_price, actual_price, pay_id, pay_status, pay_time, 
          ship_sn, ship_channel, ship_start_time, ship_end_time, confirm_time, end_time, 
          add_time, deleted
      </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, 
      consignee, mobile, address, 
      goods_price, freight_price, coupon_price, 
      integral_price, order_price, actual_price, 
      pay_id, pay_status, pay_time, 
      ship_sn, ship_channel, ship_start_time, 
      ship_end_time, confirm_time, end_time, 
      add_time, deleted)
    values (#{userId,jdbcType=INTEGER}, #{orderSn,jdbcType=VARCHAR}, #{orderStatus,jdbcType=SMALLINT}, 
      #{consignee,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, 
      #{goodsPrice,jdbcType=DECIMAL}, #{freightPrice,jdbcType=DECIMAL}, #{couponPrice,jdbcType=DECIMAL}, 
      #{integralPrice,jdbcType=DECIMAL}, #{orderPrice,jdbcType=DECIMAL}, #{actualPrice,jdbcType=DECIMAL}, 
      #{payId,jdbcType=VARCHAR}, #{payStatus,jdbcType=SMALLINT}, #{payTime,jdbcType=TIMESTAMP}, 
      #{shipSn,jdbcType=VARCHAR}, #{shipChannel,jdbcType=VARCHAR}, #{shipStartTime,jdbcType=TIMESTAMP}, 
      #{shipEndTime,jdbcType=TIMESTAMP}, #{confirmTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, 
      #{addTime,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="consignee != null">
        consignee,
      </if>
      <if test="mobile != null">
        mobile,
      </if>
      <if test="address != null">
        address,
      </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="orderPrice != null">
        order_price,
      </if>
      <if test="actualPrice != null">
        actual_price,
      </if>
      <if test="payId != null">
        pay_id,
      </if>
      <if test="payStatus != null">
        pay_status,
      </if>
      <if test="payTime != null">
        pay_time,
      </if>
      <if test="shipSn != null">
        ship_sn,
      </if>
      <if test="shipChannel != null">
        ship_channel,
      </if>
      <if test="shipStartTime != null">
        ship_start_time,
      </if>
      <if test="shipEndTime != null">
        ship_end_time,
      </if>
      <if test="confirmTime != null">
        confirm_time,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="addTime != null">
        add_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="consignee != null">
        #{consignee,jdbcType=VARCHAR},
      </if>
      <if test="mobile != null">
        #{mobile,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,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="orderPrice != null">
        #{orderPrice,jdbcType=DECIMAL},
      </if>
      <if test="actualPrice != null">
        #{actualPrice,jdbcType=DECIMAL},
      </if>
      <if test="payId != null">
        #{payId,jdbcType=VARCHAR},
      </if>
      <if test="payStatus != null">
        #{payStatus,jdbcType=SMALLINT},
      </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="shipStartTime != null">
        #{shipStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="shipEndTime != null">
        #{shipEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="confirmTime != null">
        #{confirmTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="addTime != null">
        #{addTime,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.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.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.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.payStatus != null">
        pay_status = #{record.payStatus,jdbcType=SMALLINT},
      </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.shipStartTime != null">
        ship_start_time = #{record.shipStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.shipEndTime != null">
        ship_end_time = #{record.shipEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.confirmTime != null">
        confirm_time = #{record.confirmTime,jdbcType=TIMESTAMP},
      </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.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},
      consignee = #{record.consignee,jdbcType=VARCHAR},
      mobile = #{record.mobile,jdbcType=VARCHAR},
      address = #{record.address,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},
      order_price = #{record.orderPrice,jdbcType=DECIMAL},
      actual_price = #{record.actualPrice,jdbcType=DECIMAL},
      pay_id = #{record.payId,jdbcType=VARCHAR},
      pay_status = #{record.payStatus,jdbcType=SMALLINT},
      pay_time = #{record.payTime,jdbcType=TIMESTAMP},
      ship_sn = #{record.shipSn,jdbcType=VARCHAR},
      ship_channel = #{record.shipChannel,jdbcType=VARCHAR},
      ship_start_time = #{record.shipStartTime,jdbcType=TIMESTAMP},
      ship_end_time = #{record.shipEndTime,jdbcType=TIMESTAMP},
      confirm_time = #{record.confirmTime,jdbcType=TIMESTAMP},
      end_time = #{record.endTime,jdbcType=TIMESTAMP},
      add_time = #{record.addTime,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="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="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="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="payStatus != null">
        pay_status = #{payStatus,jdbcType=SMALLINT},
      </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="shipStartTime != null">
        ship_start_time = #{shipStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="shipEndTime != null">
        ship_end_time = #{shipEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="confirmTime != null">
        confirm_time = #{confirmTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        end_time = #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="addTime != null">
        add_time = #{addTime,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},
      consignee = #{consignee,jdbcType=VARCHAR},
      mobile = #{mobile,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR},
      goods_price = #{goodsPrice,jdbcType=DECIMAL},
      freight_price = #{freightPrice,jdbcType=DECIMAL},
      coupon_price = #{couponPrice,jdbcType=DECIMAL},
      integral_price = #{integralPrice,jdbcType=DECIMAL},
      order_price = #{orderPrice,jdbcType=DECIMAL},
      actual_price = #{actualPrice,jdbcType=DECIMAL},
      pay_id = #{payId,jdbcType=VARCHAR},
      pay_status = #{payStatus,jdbcType=SMALLINT},
      pay_time = #{payTime,jdbcType=TIMESTAMP},
      ship_sn = #{shipSn,jdbcType=VARCHAR},
      ship_channel = #{shipChannel,jdbcType=VARCHAR},
      ship_start_time = #{shipStartTime,jdbcType=TIMESTAMP},
      ship_end_time = #{shipEndTime,jdbcType=TIMESTAMP},
      confirm_time = #{confirmTime,jdbcType=TIMESTAMP},
      end_time = #{endTime,jdbcType=TIMESTAMP},
      add_time = #{addTime,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.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    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.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.value}
        </foreach>
      </when>
      <otherwise>
        id, user_id, order_sn, order_status, consignee, mobile, address, goods_price, freight_price, 
          coupon_price, integral_price, order_price, actual_price, pay_id, pay_status, pay_time, 
          ship_sn, ship_channel, ship_start_time, ship_end_time, confirm_time, end_time, 
          add_time, deleted
      </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.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    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.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    update litemall_order set deleted = 1
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>