diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index bde344d9e..05cccca76 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -313,13 +313,11 @@ class BeforehandOrderLogic extends BaseLogic Db::startTrans(); try { $find = BeforehandOrder::where('id', $params['id'])->find(); - $other_data = $find['other_data']; - if (!empty($params['other_data']['arrival_time'])) { - $other_data->arrival_time = $params['other_data']['arrival_time']; - } + $other_data = $params['other_data']; $find->save([ 'other_data' => json_encode($other_data, true), 'file' => $params['file'], + 'store_id' => $params['store_id'], 'mark' => $params['mark'] ]); Db::commit(); diff --git a/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php b/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php index 99c6c5f8a..1715a0fe3 100644 --- a/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php +++ b/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php @@ -235,7 +235,10 @@ class BeforehandOrderCartInfoLogic extends BaseLogic if($find['is_buyer']==1){ PurchaseProductOffer::where('order_id',$find['bhoid'])->where('product_id',$find['product_id'])->update(['delete_time'=>time()]); } - return BeforehandOrderCartInfo::destroy($params['id']); + $res=BeforehandOrderCartInfo::destroy($params['id']); + $pay_price=BeforehandOrderCartInfo::where('bhoid', $params['id'])->sum('pay_price'); + BeforehandOrder::where('id',$find['bhoid'])->update(['pay_price'=>$pay_price]); + return $res; }