|
@@ -0,0 +1,53 @@
|
|
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
+<!DOCTYPE mapper
|
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
+ "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
+<mapper namespace="com.tzy.mapper.LotOrderMapper">
|
|
|
|
|
+ <resultMap id="lotOrderResultMap" type="lotOrder">
|
|
|
|
|
+ <id column="id" property="id"/>
|
|
|
|
|
+ <result column="order_no" property="orderNo"/>
|
|
|
|
|
+ <result column="auction_name" property="auctionName"/>
|
|
|
|
|
+ <result column="lot_name" property="lotName"/>
|
|
|
|
|
+ <result column="user_id" property="lotId"/>
|
|
|
|
|
+ <result column="status" property="status"/>
|
|
|
|
|
+ <result column="payment_amount" property="paymentAmount"/>
|
|
|
|
|
+ <result column="merchant_id" property="merchantId"/>
|
|
|
|
|
+ <result column="shipping_address_id" property="shippingAddressId"/>
|
|
|
|
|
+ <result column="express_id" property="expressId"/>
|
|
|
|
|
+ <result column="lot_id" property="lotId"/>
|
|
|
|
|
+ <result column="auction_id" property="auctionId"/>
|
|
|
|
|
+ <result column="create_time" property="createTime"/>
|
|
|
|
|
+ <result column="pay_time" property="payTime"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <select id="selectLotOrder" resultMap="lotOrderResultMap" parameterType="lotOrder">
|
|
|
|
|
+ select id,order_no,auction_name,lot_name,user_id,status,payment_amount,merchant_id,shipping_address_id,express_id,lot_id,auction_id,create_time,pay_time from lot_order_info
|
|
|
|
|
+ <where>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="orderNo!=null and orderNo!=''">
|
|
|
|
|
+ and order_no=#{orderNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status!=null">
|
|
|
|
|
+ and status=#{status}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="userId!=null">
|
|
|
|
|
+ and user_id=#{userId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by create_time desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="selectLotOrderById" resultType="lotOrder">
|
|
|
|
|
+ select id,order_no,auction_name,lot_name,user_id,status,payment_amount,merchant_id,shipping_address_id,express_id,lot_id,auction_id,create_time,pay_time from lot_order_info
|
|
|
|
|
+ where id=#{id}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="countLotOrderByLotId" parameterType="lotOrder" resultType="int">
|
|
|
|
|
+ select count(*) from lot_order_info where lot_id=#{lotId}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <insert id="insertLotOrder">
|
|
|
|
|
+ insert into lot_order_info (order_no,auction_name,lot_name,user_id,status,payment_amount,merchant_id,shipping_address_id,express_id,lot_id,auction_id,create_time,pay_time)
|
|
|
|
|
+ values (#{orderNo},#{auctionName},#{lotName},#{userId},#{status},#{paymentAmount},#{merchantId},#{shippingAddressId},#{expressId},#{lotId},#{auctionId},#{createTime},#{payTime})
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="updateLotOrderAddress" parameterType="lotOrder">
|
|
|
|
|
+ update lot_order_info set shipping_address_id=#{shippingAddressId},shipping_address=#{shippingAddress},shipping_address_likename=#{shippingAddressLinkname},shipping_address_phone=#{shippingAddressPhone}
|
|
|
|
|
+ where id=#{id}
|
|
|
|
|
+ </update>
|
|
|
|
|
+</mapper>
|