修改充值退款退礼品券的逻辑
This commit is contained in:
parent
a9bb4c25d9
commit
44c1bb40fd
@ -431,7 +431,7 @@ class PayNotifyLogic extends BaseLogic
|
||||
$orderRe->refund_time = time();
|
||||
$orderRe->remarks = '';
|
||||
$orderRe->save();
|
||||
|
||||
self::descUserSing($orderRe);
|
||||
return true;
|
||||
}
|
||||
$order->status = OrderEnum::REFUND_PAY;
|
||||
@ -480,8 +480,9 @@ class PayNotifyLogic extends BaseLogic
|
||||
return true;
|
||||
// self::afterPay($order,$extra['transaction_id']);
|
||||
}
|
||||
|
||||
|
||||
//退积分
|
||||
//退积分-->订单
|
||||
public static function descUserSing($order)
|
||||
{
|
||||
$user_sing = new UserSign();
|
||||
@ -501,12 +502,12 @@ class PayNotifyLogic extends BaseLogic
|
||||
'order_id'=>$order['order_id'],
|
||||
'financial_pm'=>1,
|
||||
])->update(['delete_time'=>time()]);
|
||||
$now_int = User::where('id',$order['uid'])->find();
|
||||
$now_int = User::where('id',$order['uid'])->withTrashed()->find();
|
||||
if($now_int){
|
||||
if($now_int['integral'] > $user_number){
|
||||
User::where('id',$order['uid'])->dec('integral',$user_number)->update();
|
||||
User::where('id',$order['uid'])->withTrashed()->dec('integral',$user_number)->update();
|
||||
}else{
|
||||
User::where('id',$order['uid'])->dec('integral',$now_int['integral'])->update();
|
||||
User::where('id',$order['uid'])->withTrashed()->dec('integral',$now_int['integral'])->update();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user