feat: 修改PayNotifyLogic以增加用户积分
This commit is contained in:
parent
92c20a1570
commit
5768afd77a
@ -311,14 +311,16 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
//商户应该获得的钱 每个商品的price-ot_price 利润
|
//商户应该获得的钱 每个商品的price-ot_price 利润
|
||||||
// if (isset($order->profit) && $order->profit > 0) {
|
// if (isset($order->profit) && $order->profit > 0) {
|
||||||
if($order['uid']>0){
|
if($order['uid']>0){
|
||||||
|
$user_number=bcmul($order['pay_price'], '0.01', 2);
|
||||||
$sing = [
|
$sing = [
|
||||||
'uid' => $order['uid'],
|
'uid' => $order['uid'],
|
||||||
'order_id' => $order['order_id'],
|
'order_id' => $order['order_id'],
|
||||||
'title' => '购买商品获得兑换券',
|
'title' => '购买商品获得兑换券',
|
||||||
'store_id' => $order['store_id'],
|
'store_id' => $order['store_id'],
|
||||||
'number' => bcmul($order['pay_price'], '0.01', 2),
|
'number' =>$user_number,
|
||||||
];
|
];
|
||||||
$user_sing->save($sing);
|
$user_sing->save($sing);
|
||||||
|
User::where('id', $order['uid'])->inc('integral', $user_number)->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
//平台手续费
|
//平台手续费
|
||||||
|
Loading…
x
Reference in New Issue
Block a user