修复委托商品下单bug

This commit is contained in:
yaooo 2023-09-11 10:14:04 +08:00
parent 3f0de6b3d5
commit 39de61cb98
2 changed files with 5 additions and 5 deletions

View File

@ -172,7 +172,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
$product_cart = [];
foreach ($merchantCart['list'] as $k => $cart) {
if ($order_type == 98 || $order_type == 99) {
if ($order_type == 98) {
$merchantCart['list'][$k]['product']['delivery_way'] = $cart['product']['delivery_way'] = $deliverMethod ?? '';
}
//获取订单类型, 活动商品单次只能购买一个

View File

@ -253,10 +253,10 @@ class StoreOrderRepository extends BaseRepository
//更新委托订单处理
if ($order->activity_type == 99) {
$cartIdArray = explode(',', $order->cart_id);
$cartList = Db::name('store_cart')->whereIn('cart_id', $cartIdArray)->select();
foreach($cartList as $cart) {
if (!empty($cart['source_id'])) {
Db::name('community')->whereIn('community_id', $cart['source_id'])->update(['entrust_order_id' => $order->order_id ?? 0]);
$ecartList = Db::name('store_cart')->whereIn('cart_id', $cartIdArray)->select();
foreach($ecartList as $ecart) {
if (!empty($ecart['source_id'])) {
Db::name('community')->where('community_id', $ecart['source_id'])->update(['entrust_order_id' => $order->order_id ?? 0]);
}
}
}