mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 22:10:49 +00:00
拆单订单状态
This commit is contained in:
parent
ca55fd463e
commit
c3022dcbea
@ -566,10 +566,19 @@ class StoreOrder extends AuthController
|
||||
$orderInfo->refund_status = 0;
|
||||
$orderInfo->refund_type = 3;
|
||||
$orderInfo->save();
|
||||
if ($orderInfo->pid > 0) {
|
||||
$res1 = $this->services->getCount([
|
||||
['pid', '=', $orderInfo->pid],
|
||||
['refund_type', '>', 0],
|
||||
['refund_type', '<>', 3],
|
||||
]);
|
||||
if ($res1 == 0) {
|
||||
$this->services->update($orderInfo->pid, ['refund_status' => 0]);
|
||||
}
|
||||
}
|
||||
$services->storeProductOrderRefundNo((int)$id, $refund_reason);
|
||||
//提醒推送
|
||||
event('notice.notice', [['orderInfo' => $orderInfo], 'send_order_refund_no_status']);
|
||||
//
|
||||
return app('json')->success('Modified success');
|
||||
}
|
||||
|
||||
|
||||
@ -428,6 +428,16 @@ class StoreOrderDeliveryServices extends BaseServices
|
||||
throw new ValidateException('暂时不支持其他发货类型');
|
||||
}
|
||||
|
||||
if ($orderInfo['pid'] > 0) {
|
||||
/** @var StoreOrderCartInfoServices $cartInfoService */
|
||||
$cartInfoService = app()->make(StoreOrderCartInfoServices::class);
|
||||
$res = $cartInfoService->getSplitCartList($orderInfo['pid']);
|
||||
if ($res) {
|
||||
$this->dao->update($orderInfo['pid'], ['status' => 3]);
|
||||
} else {
|
||||
$this->dao->update($orderInfo['pid'], ['status' => 4]);
|
||||
}
|
||||
}
|
||||
event('order.delivery', [$orderInfo, $storeName, $data, $type]);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ class StoreOrderSplitServices extends BaseServices
|
||||
$order_data['cart_id'] = [];
|
||||
$order_data['unique'] = $storeOrderCreateServices->getNewOrderId('');
|
||||
$order_data['add_time'] = time();
|
||||
$order_data['mark'] = '发货拆分订单';
|
||||
$order_data['mark'] = '拆分订单';
|
||||
$new_order = $this->dao->save($order_data);
|
||||
if (!$new_order) {
|
||||
throw new ValidateException('生成新订单失败');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user