feat: 修改了在StoreOrderLists和StoreOrderController中的代码逻辑,优化了订单创建流程。
This commit is contained in:
parent
b7f8c6ad42
commit
2c2baf4135
@ -69,10 +69,10 @@ class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
}
|
}
|
||||||
$product = StoreOrderCartInfo::where('oid', $item['id'])->field(['id', 'oid', 'product_id', 'cart_info'])
|
$product = StoreOrderCartInfo::where('oid', $item['id'])->field(['id', 'oid', 'product_id', 'cart_info'])
|
||||||
->limit(3)->select();
|
->limit(3)->select();
|
||||||
foreach ($product as &$items) {
|
foreach ($product as &$items) {
|
||||||
$items['store_name'] = $items['cart_info']['name'];
|
$items['store_name'] = $items['cart_info']['name'];
|
||||||
$items['image'] = $items['cart_info']['image'];
|
$items['image'] = $items['cart_info']['image'];
|
||||||
}
|
}
|
||||||
$item['product'] = $product;
|
$item['product'] = $product;
|
||||||
return $item;
|
return $item;
|
||||||
})
|
})
|
||||||
|
@ -169,7 +169,7 @@ class StoreOrderController extends BaseAdminController
|
|||||||
$user = User::where('id', $uid)->find();
|
$user = User::where('id', $uid)->find();
|
||||||
}
|
}
|
||||||
$params['store_id'] = $this->request->adminInfo['store_id']; //当前登录的店铺id,用于判断是否是当前店铺的订单
|
$params['store_id'] = $this->request->adminInfo['store_id']; //当前登录的店铺id,用于判断是否是当前店铺的订单
|
||||||
$order = StoreOrderLogic::createOrder($cartId, $addressId, $user, $params);
|
$order = OrderLogic::createOrder($cartId, $addressId, $user, $params);
|
||||||
if ($order != false) {
|
if ($order != false) {
|
||||||
switch ($pay_type) {
|
switch ($pay_type) {
|
||||||
case PayEnum::PURCHASE_FUNDS:
|
case PayEnum::PURCHASE_FUNDS:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user