...
|
...
|
@@ -17,11 +17,12 @@ |
|
|
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
|
|
|
<result column="channel_no" property="channelNo" jdbcType="VARCHAR" />
|
|
|
<result column="attributes" property="attributes" jdbcType="INTEGER" />
|
|
|
<result column="platform_delivery_status" jdbcType="INTEGER" property="platformDeliveryStatus" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
id, uid, order_code, seller_uid, client_type, payment, payment_type, is_cancel,
|
|
|
amount, ship_fee, status, create_time, update_time, channel_no, attributes
|
|
|
amount, ship_fee, status, create_time, update_time, channel_no, attributes ,platform_delivery_status
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectByOrderCode" resultMap="BaseResultMap">
|
...
|
...
|
@@ -66,6 +67,7 @@ |
|
|
</if>
|
|
|
<!-- 平台物流是否存在 -->
|
|
|
<if test="platformExpressInfoFlag != null and platformExpressInfoFlag != '' ">
|
|
|
<!--
|
|
|
and
|
|
|
<if test="platformExpressInfoFlag == 'haveNotExpress'">
|
|
|
NOT
|
...
|
...
|
@@ -73,6 +75,13 @@ |
|
|
exists (
|
|
|
select tmp.id from express_record tmp where a.order_code = tmp.order_code and tmp.express_type in (2,3,4)
|
|
|
)
|
|
|
-->
|
|
|
<if test="platformExpressInfoFlag == 'haveNotExpress'">
|
|
|
and a.platform_delivery_status = 0
|
|
|
</if>
|
|
|
<if test="platformExpressInfoFlag == 'haveExpress'">
|
|
|
and a.platform_delivery_status in (1,2)
|
|
|
</if>
|
|
|
</if>
|
|
|
</select>
|
|
|
|
...
|
...
|
@@ -122,6 +131,9 @@ |
|
|
<if test="buyerOrderReq.skup != null and buyerOrderReq.skup != 0 ">
|
|
|
and c.id = #{buyerOrderReq.skup}
|
|
|
</if>
|
|
|
<if test="buyerOrderReq.storageId != null and buyerOrderReq.storageId != 0 ">
|
|
|
and c.storage_id = #{buyerOrderReq.storageId}
|
|
|
</if>
|
|
|
<if test="buyerOrderReq.depotNo != null">
|
|
|
and c.depot_no = #{buyerOrderReq.depotNo}
|
|
|
</if>
|
...
|
...
|
@@ -142,20 +154,26 @@ |
|
|
</if>
|
|
|
<!-- 平台物流是否存在 -->
|
|
|
<if test="buyerOrderReq.platformExpressInfoFlag != null and buyerOrderReq.platformExpressInfoFlag != '' ">
|
|
|
and
|
|
|
<!--and
|
|
|
<if test="buyerOrderReq.platformExpressInfoFlag == 'haveNotExpress'">
|
|
|
NOT
|
|
|
</if>
|
|
|
exists (
|
|
|
select tmp.id from express_record tmp where a.order_code = tmp.order_code and tmp.express_type in (2,3,4)
|
|
|
)
|
|
|
)-->
|
|
|
<if test="buyerOrderReq.platformExpressInfoFlag == 'haveNotExpress'">
|
|
|
and a.platform_delivery_status = 0
|
|
|
</if>
|
|
|
<if test="buyerOrderReq.platformExpressInfoFlag == 'haveExpress'">
|
|
|
and a.platform_delivery_status in (1,2)
|
|
|
</if>
|
|
|
</if>
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTotalByCondition" resultType="java.lang.Integer" parameterType="com.yoho.order.model.BuyerOrderReq">
|
|
|
select count(a.id)
|
|
|
from buyer_order a
|
|
|
<if test="(buyerOrderReq.depotNo != null) or (buyerOrderReq.productId != null) or (buyerOrderReq.skup != null)">
|
|
|
<if test="(buyerOrderReq.depotNo != null) or (buyerOrderReq.productId != null) or (buyerOrderReq.skup != null) or (buyerOrderReq.storageId != null)">
|
|
|
LEFT JOIN buyer_order_goods b
|
|
|
ON( b.order_code=a.order_code)
|
|
|
LEFT JOIN seller_order_goods c
|
...
|
...
|
@@ -176,7 +194,7 @@ |
|
|
<select id="selectByCondition" resultMap="BaseResultMap" parameterType="com.yoho.order.model.BuyerOrderReq">
|
|
|
select a.*
|
|
|
from buyer_order a
|
|
|
<if test="(buyerOrderReq.depotNo != null) or (buyerOrderReq.productId != null) or (buyerOrderReq.skup != null)">
|
|
|
<if test="(buyerOrderReq.depotNo != null) or (buyerOrderReq.productId != null) or (buyerOrderReq.skup != null) or (buyerOrderReq.storageId != null)">
|
|
|
LEFT JOIN buyer_order_goods b
|
|
|
ON( b.order_code=a.order_code)
|
|
|
LEFT JOIN seller_order_goods c
|
...
|
...
|
|