|
@@ -11,7 +11,7 @@
|
|
|
<result column="actual_total" jdbcType="DECIMAL" property="actualTotal"/>
|
|
|
<result column="pay_type" jdbcType="INTEGER" property="payType"/>
|
|
|
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
|
|
|
- <result column="status" jdbcType="INTEGER" property="status"/>
|
|
|
+ <result column="hb_order_status" jdbcType="INTEGER" property="hbOrderStatus"/>
|
|
|
<result column="dvy_type" jdbcType="VARCHAR" property="dvyType"/>
|
|
|
<result column="dvy_id" jdbcType="BIGINT" property="dvyId"/>
|
|
|
<result column="dvy_flow_id" jdbcType="VARCHAR" property="dvyFlowId"/>
|
|
@@ -84,7 +84,6 @@
|
|
|
<result column="actual_total" jdbcType="DECIMAL" property="actualTotal"/>
|
|
|
<result column="pay_type" jdbcType="INTEGER" property="payType"/>
|
|
|
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
|
|
|
- <result column="status" jdbcType="INTEGER" property="status"/>
|
|
|
<result column="dvy_type" jdbcType="VARCHAR" property="dvyType"/>
|
|
|
<result column="dvy_id" jdbcType="BIGINT" property="dvyId"/>
|
|
|
<result column="dvy_flow_id" jdbcType="VARCHAR" property="dvyFlowId"/>
|
|
@@ -99,6 +98,7 @@
|
|
|
<result column="finally_time" jdbcType="TIMESTAMP" property="finallyTime"/>
|
|
|
<result column="cancel_time" jdbcType="TIMESTAMP" property="cancelTime"/>
|
|
|
<result column="is_payed" jdbcType="BIT" property="isPayed"/>
|
|
|
+ <result column="hb_order_status" jdbcType="INTEGER" property="hbOrderStatus"/>
|
|
|
<result column="delete_status" jdbcType="INTEGER" property="deleteStatus"/>
|
|
|
<result column="refund_status" jdbcType="INTEGER" property="refundStatus"/>
|
|
|
<result column="order_type" jdbcType="INTEGER" property="orderType"/>
|
|
@@ -139,7 +139,7 @@
|
|
|
<result column="actual_total" jdbcType="DECIMAL" property="actualTotal"/>
|
|
|
<result column="pay_type" jdbcType="INTEGER" property="payType"/>
|
|
|
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
|
|
|
- <result column="status" jdbcType="INTEGER" property="status"/>
|
|
|
+ <result column="hb_order_status" jdbcType="INTEGER" property="hbOrderStatus"/>
|
|
|
<result column="dvy_type" jdbcType="VARCHAR" property="dvyType"/>
|
|
|
<result column="dvy_id" jdbcType="BIGINT" property="dvyId"/>
|
|
|
<result column="nick_name" jdbcType="BIGINT" property="nickName"/>
|
|
@@ -212,19 +212,19 @@
|
|
|
select o.*,oi.*,tor.return_money_sts,oi.prod_name oi_prod_name,oi.actual_total as oi_actual_total from tz_order o
|
|
|
join tz_order_item oi on o.order_number = oi.order_number
|
|
|
left join tz_order_refund tor on tor.order_id = o.order_id
|
|
|
- where o.status = #{orderStatus} and (refund_status IS NULL OR o.refund_status <> 1)
|
|
|
+ where o.hb_order_status = #{orderStatus} and (refund_status IS NULL OR o.refund_status <> 1)
|
|
|
and o.update_time < #{lessThanUpdateTime}
|
|
|
</select>
|
|
|
|
|
|
<update id="cancelOrders">
|
|
|
- update tz_order set `status`=6,cancel_time = NOW(),update_time=NOW() where order_id in
|
|
|
+ update tz_order set `hb_order_status`=60,cancel_time = NOW(),update_time=NOW() where order_id in
|
|
|
<foreach collection="orders" item="order" open="(" close=")" separator=",">
|
|
|
#{order.orderId}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
|
|
|
<update id="receiptOrder">
|
|
|
- update tz_order set `status`=5,finally_time = NOW(),update_time=NOW() where order_id in
|
|
|
+ update tz_order set `hb_order_status`=80,finally_time = NOW(),update_time=NOW() where order_id in
|
|
|
<foreach collection="orders" item="order" open="(" close=")" separator=",">
|
|
|
#{order.orderId}
|
|
|
</foreach>
|
|
@@ -239,7 +239,7 @@
|
|
|
</update>
|
|
|
|
|
|
<select id="listOrdersDetialByOrder" resultMap="orderAndOrderItemAndUserAddrMap">
|
|
|
- select o.*,oi.*,oi.prod_name as item_prod_name,o.prod_name as order_prod_name,uao.* ,oi.status as oi_status
|
|
|
+ select o.*,oi.*,oi.prod_name as item_prod_name,o.prod_name as order_prod_name,uao.* ,oi.hb_order_status as oi_status
|
|
|
from tz_order o
|
|
|
left join tz_order_item oi on o.order_number = oi.order_number
|
|
|
left join tz_user_addr_order uao on o.addr_order_id = uao.addr_order_id
|
|
@@ -251,15 +251,15 @@
|
|
|
<if test="order.orderNumber != null and order.orderNumber != ''">
|
|
|
and o.order_number like concat('%',#{order.orderNumber},'%')
|
|
|
</if>
|
|
|
- <if test="order.status != null">
|
|
|
- and o.status = #{order.status}
|
|
|
+ <if test="order.hb_order_status != null">
|
|
|
+ and o.hb_order_status = #{order.orderStatus}
|
|
|
</if>
|
|
|
<if test="order.shopId != null">
|
|
|
and o.shop_id = #{order.shopId}
|
|
|
</if>
|
|
|
<if test="order.isPayed != null">
|
|
|
and o.is_payed = #{order.isPayed}
|
|
|
- and o.status != 6
|
|
|
+ and o.hb_order_status != 60
|
|
|
</if>
|
|
|
<if test="startTime != null">
|
|
|
and o.create_time > #{startTime}
|
|
@@ -362,7 +362,7 @@
|
|
|
|
|
|
<select id="listOrdersDetialByOrderParam" resultMap="orderAndOrderItemAndUserAddrMap">
|
|
|
SELECT *,oi.prod_name as item_prod_name,oi.actual_total as oi_actual_total,IF(r.refund_type = 2,r.return_money_sts,IF(ar.refund_type = 1,ar.return_money_sts,NULL)) AS oi_return_money_sts,
|
|
|
- temp.prod_name as order_prod_name,oi.status as oi_status, IF(os.pay_score IS NULL,0,os.pay_score) as pay_score
|
|
|
+ temp.prod_name as order_prod_name,oi.hb_order_status as oi_status, IF(os.pay_score IS NULL,0,os.pay_score) as pay_score
|
|
|
FROM
|
|
|
(
|
|
|
SELECT o.*,sd.shop_name,uao.receiver,uao.mobile,u.user_mobile,u.nick_name FROM tz_order o
|
|
@@ -389,8 +389,8 @@
|
|
|
<!-- <if test="orderParam.type!=null and orderParam.type==6 and orderParam.content != null and orderParam.content != ''">-->
|
|
|
<!-- and u.dvy_flow_id = #{orderParam.content}-->
|
|
|
<!-- </if>-->
|
|
|
- <if test="orderParam.status != null">
|
|
|
- and o.status = #{orderParam.status}
|
|
|
+ <if test="orderParam.hb_order_status != null">
|
|
|
+ and o.hb_order_status = #{orderParam.hbOrderStatus}
|
|
|
</if>
|
|
|
<!-- <if test="orderParam.payType != null">-->
|
|
|
<!-- and o.pay_type = #{orderParam.payType}-->
|
|
@@ -400,7 +400,7 @@
|
|
|
</if>
|
|
|
<if test="orderParam.isPayed != null">
|
|
|
and o.is_payed = #{orderParam.isPayed}
|
|
|
- and o.status != 6
|
|
|
+ and o.hb_order_status != 60
|
|
|
</if>
|
|
|
<if test="orderParam.startTime != null">
|
|
|
and o.create_time > #{orderParam.startTime}
|
|
@@ -455,15 +455,15 @@
|
|
|
<if test="orderParam.orderNumber != null and orderParam.orderNumber != ''">
|
|
|
and o.order_number = #{orderParam.orderNumber}
|
|
|
</if>
|
|
|
- <if test="orderParam.status != null">
|
|
|
- and o.status = #{orderParam.status}
|
|
|
+ <if test="orderParam.orderStatus != null">
|
|
|
+ and o.hb_order_status = #{orderParam.orderStatus}
|
|
|
</if>
|
|
|
<if test="orderParam.shopId != null">
|
|
|
and o.shop_id = #{orderParam.shopId}
|
|
|
</if>
|
|
|
<if test="orderParam.isPayed != null">
|
|
|
and o.is_payed = #{orderParam.isPayed}
|
|
|
- and o.status != 6
|
|
|
+ and o.hb_order_status != 60
|
|
|
</if>
|
|
|
<if test="orderParam.startTime != null">
|
|
|
and o.create_time > #{orderParam.startTime}
|
|
@@ -504,12 +504,12 @@
|
|
|
count(o.order_number) as expense_number,
|
|
|
ifnull(SUM(o.actual_total),0) as expense_amount
|
|
|
from tz_order o
|
|
|
- where o.user_id=#{userId} and o.shop_id = #{shopId} and (o.status = 4 or o.status = 5)
|
|
|
+ where o.user_id=#{userId} and o.shop_id = #{shopId} and (o.hb_order_status = 45 or o.hb_order_status = 80)
|
|
|
</select>
|
|
|
|
|
|
<select id="listMyOrderByUserIdAndStatus" resultMap="MyOrderMap">
|
|
|
SELECT
|
|
|
- o.order_type,o.actual_total,o.status,o.order_number,o.freight_amount,o.create_time,o.order_id,
|
|
|
+ o.order_type,o.actual_total,o.hb_order_status,o.order_number,o.freight_amount,o.create_time,o.order_id,
|
|
|
o.hb_order_status,
|
|
|
o.hb_logistic_status,
|
|
|
o.offset_points,
|
|
@@ -571,12 +571,12 @@
|
|
|
<select id="getOrderCount" resultType="com.yami.shop.bean.app.dto.OrderCountData">
|
|
|
SELECT
|
|
|
COUNT(o.order_id) all_count,
|
|
|
- COUNT( CASE WHEN o.status = 1 THEN o.order_id ELSE NULL END ) AS unPay,
|
|
|
- COUNT( CASE WHEN o.status = 2 THEN o.order_id ELSE NULL END ) AS payed,
|
|
|
- COUNT( CASE WHEN o.status = 3 THEN o.order_id ELSE NULL END ) AS consignment,
|
|
|
- COUNT( CASE WHEN o.status = 4 THEN o.order_id ELSE NULL END ) AS confirm,
|
|
|
- COUNT( CASE WHEN o.status = 5 THEN o.order_id ELSE NULL END ) AS success,
|
|
|
- COUNT( CASE WHEN o.status = 6 THEN o.order_id ELSE NULL END ) AS `close`
|
|
|
+ COUNT( CASE WHEN o.hbOrderStatus = 0 THEN o.order_id ELSE NULL END ) AS unPay,
|
|
|
+ COUNT( CASE WHEN o.hbOrderStatus = 20 THEN o.order_id ELSE NULL END ) AS payed,
|
|
|
+ COUNT( CASE WHEN o.hbOrderStatus = 30 THEN o.order_id ELSE NULL END ) AS consignment,
|
|
|
+ COUNT( CASE WHEN o.hbOrderStatus = 40 THEN o.order_id ELSE NULL END ) AS confirm,
|
|
|
+ COUNT( CASE WHEN o.hbOrderStatus = 50 THEN o.order_id ELSE NULL END ) AS success,
|
|
|
+ COUNT( CASE WHEN o.hbOrderStatus = 60 THEN o.order_id ELSE NULL END ) AS `close`
|
|
|
FROM tz_order o
|
|
|
WHERE o.user_id =#{userId} AND o.delete_status = 0
|
|
|
</select>
|
|
@@ -586,7 +586,7 @@
|
|
|
tz_seckill s ON s.seckill_id = so.seckill_id
|
|
|
AND (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(so.`create_time`))/60 > s.`max_cancel_time` and so.state = 0 ) t
|
|
|
ON o.order_number = t.order_number
|
|
|
- SET o.`status`=6,o.cancel_time = NOW(),o.update_time=NOW()
|
|
|
+ SET o.`status`=60,o.cancel_time = NOW(),o.update_time=NOW()
|
|
|
</update>
|
|
|
|
|
|
<update id="updateToWaitGroup">
|
|
@@ -594,7 +594,7 @@
|
|
|
</update>
|
|
|
|
|
|
<update id="updateToWaitDelivery">
|
|
|
- UPDATE tz_order SET `status` = 2, `update_time` = NOW()
|
|
|
+ UPDATE tz_order SET `hb_order_status` = 20, `update_time` = NOW()
|
|
|
WHERE `order_number` IN
|
|
|
(
|
|
|
SELECT order_number FROM
|
|
@@ -618,7 +618,7 @@
|
|
|
<select id="hasBuySuccessProd" resultType="java.lang.Integer">
|
|
|
select count(*) from tz_order_item oi
|
|
|
join tz_order o on o.order_number = oi.order_number
|
|
|
- where o.user_id=#{userId} and o.status = 5 and oi.prod_id = #{prodId}
|
|
|
+ where o.user_id=#{userId} and o.hb_order_status = 50 and oi.prod_id = #{prodId}
|
|
|
</select>
|
|
|
|
|
|
<select id="listMyOrderByParams" resultMap="MyOrderMap">
|