setter
parent
1559121e91
commit
4493db3bc5
|
@ -43,7 +43,7 @@ class Index extends Base
|
|||
$item = AccountRepository::getInstance()->findById($id);
|
||||
|
||||
$statusList = [
|
||||
Order::STATUS_SHIPPED, Order::STATUS_ORDER_PLACED, Order::STATUS_COMPLETED
|
||||
Order::STATUS_SHIPPED, Order::STATUS_ORDER_PLACED
|
||||
];
|
||||
$consumption = OrderRepository::getInstance()->userOrderList($id, [], 1, 0, $statusList);
|
||||
$orderNum = 0;
|
||||
|
|
|
@ -11,7 +11,6 @@ class Order extends Base
|
|||
public const STATUS_MAKEING = 'makeing';//制作中
|
||||
public const STATUS_SHIPPED = 'shipped';//已发货
|
||||
public const STATUS_ARRIVED = 'arrived';//已送达
|
||||
public const STATUS_COMPLETED = 'completed';//已完成 确认收获 或者 到期自动确认
|
||||
public const STATUS_CANCEL = 'cancel';//已取消
|
||||
|
||||
public const CHECK_TYPE_FRONTEND = 'frontend';//核验类型 前端核验|线下核验
|
||||
|
@ -60,7 +59,6 @@ class Order extends Base
|
|||
self::STATUS_MAKEING => '制作中',
|
||||
self::STATUS_SHIPPED => '已发货',
|
||||
self::STATUS_ARRIVED => '已送达',
|
||||
self::STATUS_COMPLETED => '已完成',
|
||||
self::STATUS_CANCEL => '已取消',
|
||||
];
|
||||
}
|
||||
|
|
|
@ -64,7 +64,6 @@ class OrderRepository extends Repository
|
|||
public const STATUS_MAKEING = Order::STATUS_MAKEING;//制作中
|
||||
public const STATUS_SHIPPED = Order::STATUS_SHIPPED;//已发货
|
||||
public const STATUS_ARRIVED = Order::STATUS_ARRIVED;//已送达
|
||||
public const STATUS_COMPLETED = Order::STATUS_COMPLETED;//已完成 确认收获 或者 到期自动确认
|
||||
public const STATUS_CANCEL = Order::STATUS_CANCEL;//已取消
|
||||
|
||||
public const IS_EVALUATE_YES = 1; // is_evaluate 已评价(订单中的已评价指全部评价完)
|
||||
|
@ -78,7 +77,6 @@ class OrderRepository extends Repository
|
|||
self::STATUS_MAKEING => '制作中',
|
||||
self::STATUS_SHIPPED => '已发货',
|
||||
self::STATUS_ARRIVED => '已送达',
|
||||
self::STATUS_COMPLETED => '已完成',
|
||||
self::STATUS_CANCEL => '已取消',
|
||||
];
|
||||
}
|
||||
|
|
|
@ -60,9 +60,9 @@ class Order
|
|||
// 所有产品都是虚拟商品 且 都核验完成则订单设为已完成
|
||||
if ($virtualCount == $orderSkuCount) {
|
||||
Log::info('订单设为已完成');
|
||||
if ($order['status'] != OrderModel::STATUS_COMPLETED) {
|
||||
if ($order['status'] != OrderModel::STATUS_ARRIVED) {
|
||||
$order->save([
|
||||
'status' => OrderModel::STATUS_COMPLETED,
|
||||
'status' => OrderModel::STATUS_ARRIVED,
|
||||
'accepted_at' => date('Y-m-d H:i:s'),
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue