修改订单缺失参数,回调逻辑修改

This commit is contained in:
liu 2024-06-11 11:11:44 +08:00
parent ff53552f49
commit f8fb07e482
2 changed files with 2 additions and 1 deletions

View File

@ -102,6 +102,7 @@ class OrderLogic extends BaseLogic
//理论上每笔都是拆分了
$cart_select[$k]['name'] = $find['store_name'];
$cart_select[$k]['imgs'] = $find['image'];
$cart_select[$k]['store_id'] = $params['store_id']??0;
$cart_select[$k]['unit_name'] = StoreProductUnit::where(['id' => $find['unit']])->value('name');
self::$total = bcadd(self::$total, $cart_select[$k]['total'], 2);
self::$cost = bcadd(self::$cost, $cart_select[$k]['cost'], 2);

View File

@ -251,7 +251,7 @@ class PayNotifyLogic extends BaseLogic
if ($order->pay_type != 9 || $order->pay_type != 10) {
$financeLogic->in($transaction_id, $order['pay_price'], OrderEnum::USER_ORDER_PAY); //用户单入账
//商户应该获得的钱 每个商品的price-ot_price 利润
if ($order->profit !== "0.00") {
if (isset($order->profit) && $order->profit > 0) {
//手续费
$fees = bcdiv(bcmul($order['pay_price'], '0.02', 2), 1, 2);
$financeLogic->in($transaction_id, $fees, OrderEnum::ORDER_COMMITION, $order['store_id']); //手续费入账