更新订单状态

This commit is contained in:
yaooo 2023-08-19 15:00:55 +08:00
parent b4ba19e097
commit 787c917d82

View File

@ -1736,6 +1736,26 @@ class StoreOrderRepository extends BaseRepository
}
}
$order->takeOrderCount = count($order['takeOrderList']);
// 订单状态 1 未支付 2待发货 3待收货 4待评价 5交易完成 6已退款
$order->order_status = 0;
if ($order->paid == 0) {
$order->order_status = 1;
}
if ($order->paid == 1 && $order->status == 0) {
$order->order_status = 2;
}
if ($order->status == 1) {
$order->order_status = 3;
}
if ($order->status == 2) {
$order->order_status = 4;
}
if ($order->status == 3) {
$order->order_status = 5;
}
if ($order->status == -1) {
$order->order_status = 6;
}
unset($order['takeOrderList'], $order->interest);
}