diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 57876439b..baaf34f80 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -519,7 +519,7 @@ class PayNotifyLogic extends BaseLogic $financeLogic->in($transaction_id, $order['pay_price'], OrderEnum::USER_ORDER_PAY, $order['store_id'], $order['staff_id'], 0, $order['pay_type']); //用户订单支付 $financeLogic->in($transaction_id, $order['pay_price'], OrderEnum::SUPPLIER_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']); $financeLogic->out($transaction_id, $order['pay_price'], OrderEnum::SUPPLIER_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']); - if ($order['uid'] > 0) { + if ($order['uid'] > 0 && $order['total_price'] > 500) { $user_number = bcmul($order['pay_price'], '0.10', 2); $sing = [ 'uid' => $order['uid'], @@ -553,17 +553,19 @@ class PayNotifyLogic extends BaseLogic $order['pay_price'] = bcsub($order['pay_price'], $vipFrozenAmount, 2); self::dealVipAmount($order, $order['pay_type']); } + if($order['total_price'] > 500){ + $user_number = bcmul($order['pay_price'], '0.10', 2); + $sing = [ + 'uid' => $order['uid'], + 'order_id' => $order['order_id'], + 'title' => '购买商品获得兑换券', + 'store_id' => $order['store_id'], + 'number' => $user_number, + 'status' => 0, + ]; + $user_sing->save($sing); + } - $user_number = bcmul($order['pay_price'], '0.10', 2); - $sing = [ - 'uid' => $order['uid'], - 'order_id' => $order['order_id'], - 'title' => '购买商品获得兑换券', - 'store_id' => $order['store_id'], - 'number' => $user_number, - 'status' => 0, - ]; - $user_sing->save($sing); // User::where('id', $order['uid'])->inc('integral', $user_number)->update(); }