feat(PayNotifyLogic): 根据配置的金额更新用户等级,增加订单支付成功通知
This commit is contained in:
parent
087181aabd
commit
8efd106989
@ -421,7 +421,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
bcscale(2);
|
bcscale(2);
|
||||||
// $user->now_money = bcadd($user->now_money, $price, 2);//v.1
|
// $user->now_money = bcadd($user->now_money, $price, 2);//v.1
|
||||||
//更新等级
|
//更新等级
|
||||||
if ($price >= 0.01) {
|
if ($price >= Config::where('name','recharge')->value('value')) {
|
||||||
$user->user_ship = 1; //v.1
|
$user->user_ship = 1; //v.1
|
||||||
}
|
}
|
||||||
$user->purchase_funds = bcadd($user->purchase_funds, $price, 2);
|
$user->purchase_funds = bcadd($user->purchase_funds, $price, 2);
|
||||||
@ -432,6 +432,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
if (!empty($extra['payer']['openid'])) {
|
if (!empty($extra['payer']['openid'])) {
|
||||||
Redis::send('push-delivery', ['order_id' => $order['order_id'], 'openid' => $extra['payer']['openid'], 'logistics_type' => 3], 4);
|
Redis::send('push-delivery', ['order_id' => $order['order_id'], 'openid' => $extra['payer']['openid'], 'logistics_type' => 3], 4);
|
||||||
}
|
}
|
||||||
|
PushService::push('wechat_mmp_' . $order['uid'], $order['uid'], ['type'=>'INDUSTRYMEMBERS','msg'=>'订单支付成功','data'=>['id'=>$order['id'],'paid'=>1]]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class CodePaySend implements Consumer
|
|||||||
if($order){
|
if($order){
|
||||||
$res=UserRecharge::where($data)->update(['status'=>-1]);
|
$res=UserRecharge::where($data)->update(['status'=>-1]);
|
||||||
if($res){
|
if($res){
|
||||||
PushService::push('wechat_mmp_' . $order['uid'], $order['uid'], ['type'=>'INDUSTRYMEMBERS','msg'=>'支付超时,订单已被取消,请重新提交订单','data'=>['id'=>$data['id']]]);
|
PushService::push('wechat_mmp_' . $order['uid'], $order['uid'], ['type'=>'INDUSTRYMEMBERS','msg'=>'支付超时,订单已被取消,请重新提交订单','data'=>['id'=>$data['id'],'paid'=>0]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user