parent
2b81088b31
commit
9641da0006
@ -1 +1,226 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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.how2java.tmall.mapper.OrderMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.how2java.tmall.pojo.Order">
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="orderCode" jdbcType="VARCHAR" property="orderCode" />
|
||||||
|
<result column="address" jdbcType="VARCHAR" property="address" />
|
||||||
|
<result column="post" jdbcType="VARCHAR" property="post" />
|
||||||
|
<result column="receiver" jdbcType="VARCHAR" property="receiver" />
|
||||||
|
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
||||||
|
<result column="userMessage" jdbcType="VARCHAR" property="userMessage" />
|
||||||
|
<result column="createDate" jdbcType="TIMESTAMP" property="createDate" />
|
||||||
|
<result column="payDate" jdbcType="TIMESTAMP" property="payDate" />
|
||||||
|
<result column="deliveryDate" jdbcType="TIMESTAMP" property="deliveryDate" />
|
||||||
|
<result column="confirmDate" jdbcType="TIMESTAMP" property="confirmDate" />
|
||||||
|
<result column="uid" jdbcType="INTEGER" property="uid" />
|
||||||
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<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="Base_Column_List">
|
||||||
|
id, orderCode, address, post, receiver, mobile, userMessage, createDate, payDate,
|
||||||
|
deliveryDate, confirmDate, uid, status
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="com.how2java.tmall.pojo.OrderExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
'false' as QUERYID,
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from order_
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from order_
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
|
delete from order_
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.how2java.tmall.pojo.Order" useGeneratedKeys="true">
|
||||||
|
insert into order_ (orderCode, address, post,
|
||||||
|
receiver, mobile, userMessage,
|
||||||
|
createDate, payDate, deliveryDate,
|
||||||
|
confirmDate, uid, status
|
||||||
|
)
|
||||||
|
values (#{orderCode,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{post,jdbcType=VARCHAR},
|
||||||
|
#{receiver,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{userMessage,jdbcType=VARCHAR},
|
||||||
|
#{createDate,jdbcType=TIMESTAMP}, #{payDate,jdbcType=TIMESTAMP}, #{deliveryDate,jdbcType=TIMESTAMP},
|
||||||
|
#{confirmDate,jdbcType=TIMESTAMP}, #{uid,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.how2java.tmall.pojo.Order" useGeneratedKeys="true">
|
||||||
|
insert into order_
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderCode != null">
|
||||||
|
orderCode,
|
||||||
|
</if>
|
||||||
|
<if test="address != null">
|
||||||
|
address,
|
||||||
|
</if>
|
||||||
|
<if test="post != null">
|
||||||
|
post,
|
||||||
|
</if>
|
||||||
|
<if test="receiver != null">
|
||||||
|
receiver,
|
||||||
|
</if>
|
||||||
|
<if test="mobile != null">
|
||||||
|
mobile,
|
||||||
|
</if>
|
||||||
|
<if test="userMessage != null">
|
||||||
|
userMessage,
|
||||||
|
</if>
|
||||||
|
<if test="createDate != null">
|
||||||
|
createDate,
|
||||||
|
</if>
|
||||||
|
<if test="payDate != null">
|
||||||
|
payDate,
|
||||||
|
</if>
|
||||||
|
<if test="deliveryDate != null">
|
||||||
|
deliveryDate,
|
||||||
|
</if>
|
||||||
|
<if test="confirmDate != null">
|
||||||
|
confirmDate,
|
||||||
|
</if>
|
||||||
|
<if test="uid != null">
|
||||||
|
uid,
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
status,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderCode != null">
|
||||||
|
#{orderCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="address != null">
|
||||||
|
#{address,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="post != null">
|
||||||
|
#{post,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="receiver != null">
|
||||||
|
#{receiver,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="mobile != null">
|
||||||
|
#{mobile,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="userMessage != null">
|
||||||
|
#{userMessage,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="createDate != null">
|
||||||
|
#{createDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="payDate != null">
|
||||||
|
#{payDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="deliveryDate != null">
|
||||||
|
#{deliveryDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="confirmDate != null">
|
||||||
|
#{confirmDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="uid != null">
|
||||||
|
#{uid,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
#{status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.how2java.tmall.pojo.Order">
|
||||||
|
update order_
|
||||||
|
<set>
|
||||||
|
<if test="orderCode != null">
|
||||||
|
orderCode = #{orderCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="address != null">
|
||||||
|
address = #{address,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="post != null">
|
||||||
|
post = #{post,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="receiver != null">
|
||||||
|
receiver = #{receiver,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="mobile != null">
|
||||||
|
mobile = #{mobile,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="userMessage != null">
|
||||||
|
userMessage = #{userMessage,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="createDate != null">
|
||||||
|
createDate = #{createDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="payDate != null">
|
||||||
|
payDate = #{payDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="deliveryDate != null">
|
||||||
|
deliveryDate = #{deliveryDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="confirmDate != null">
|
||||||
|
confirmDate = #{confirmDate,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="uid != null">
|
||||||
|
uid = #{uid,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
status = #{status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.how2java.tmall.pojo.Order">
|
||||||
|
update order_
|
||||||
|
set orderCode = #{orderCode,jdbcType=VARCHAR},
|
||||||
|
address = #{address,jdbcType=VARCHAR},
|
||||||
|
post = #{post,jdbcType=VARCHAR},
|
||||||
|
receiver = #{receiver,jdbcType=VARCHAR},
|
||||||
|
mobile = #{mobile,jdbcType=VARCHAR},
|
||||||
|
userMessage = #{userMessage,jdbcType=VARCHAR},
|
||||||
|
createDate = #{createDate,jdbcType=TIMESTAMP},
|
||||||
|
payDate = #{payDate,jdbcType=TIMESTAMP},
|
||||||
|
deliveryDate = #{deliveryDate,jdbcType=TIMESTAMP},
|
||||||
|
confirmDate = #{confirmDate,jdbcType=TIMESTAMP},
|
||||||
|
uid = #{uid,jdbcType=INTEGER},
|
||||||
|
status = #{status,jdbcType=VARCHAR}
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
Loading…
Reference in new issue