|
|
@@ -411,22 +411,6 @@ class UserExtractRepository extends BaseRepository
|
|
411
|
411
|
}
|
|
412
|
412
|
}
|
|
413
|
413
|
|
|
414
|
|
-
|
|
415
|
|
- if($type == 3){
|
|
416
|
|
- //加入红包提现记录
|
|
417
|
|
- $insertdata = [
|
|
418
|
|
- 'uid'=> $uid,
|
|
419
|
|
- 'number' => $data['extract_price'],
|
|
420
|
|
- 'surplus' => $user->hongbao,
|
|
421
|
|
- 'mark' => '红包提现',
|
|
422
|
|
- 'type' => 2,
|
|
423
|
|
- 'status' => -1,
|
|
424
|
|
- 'addtime' => time(),
|
|
425
|
|
- ];
|
|
426
|
|
- Db::name('user_sign_hongbao')->insertGetId($insertdata);
|
|
427
|
|
- }
|
|
428
|
|
-
|
|
429
|
|
-
|
|
430
|
414
|
// if($extract_price_yihu>0){
|
|
431
|
415
|
$insertAll[]=array(
|
|
432
|
416
|
'extract_id'=>$extract->extract_id,
|
|
|
@@ -494,24 +478,30 @@ class UserExtractRepository extends BaseRepository
|
|
494
|
478
|
} else {
|
|
495
|
479
|
//用户提现逻辑处理
|
|
496
|
480
|
if($extract['types']==1){
|
|
497
|
|
- $brokerage_price = bcadd($user['brokerage_price'] ,$extract['extract_price'],2);
|
|
498
|
|
- //返回余额
|
|
499
|
|
- $user->brokerage_price = $brokerage_price;
|
|
500
|
|
- }else if($extract['types']==3){
|
|
501
|
|
- $user->hongbao = bcadd($user->hongbao,$extract['extract_price'],2);
|
|
|
481
|
+ if($extract['type']==3){
|
|
|
482
|
+ $user->hongbao = bcadd($user->hongbao,$extract['extract_price'],2);
|
|
|
483
|
+ }else {
|
|
|
484
|
+ $brokerage_price = bcadd($user['brokerage_price'] ,$extract['extract_price'],2);
|
|
|
485
|
+ //返回余额
|
|
|
486
|
+ $user->brokerage_price = $brokerage_price;
|
|
|
487
|
+ }
|
|
502
|
488
|
}else{
|
|
503
|
|
- $member_brokerage_price = bcadd($user['member_brokerage_price'] ,$extract['extract_price'],2);
|
|
504
|
|
- //返回余额
|
|
505
|
|
- $user->member_brokerage_price = $member_brokerage_price;
|
|
506
|
|
- Db::name('user_rich')->where('uid',$extract['uid'])->inc('red', $extract['extract_price'])->update();
|
|
507
|
|
- Db::name('user_rich_log')->insert([
|
|
508
|
|
- 'uid' => $extract['uid'],
|
|
509
|
|
- 'red' => $extract['extract_price'],
|
|
510
|
|
- 'pm' => 1,
|
|
511
|
|
- 'time' => time(),
|
|
512
|
|
- 'order_id' => 0,
|
|
513
|
|
- 'mark' => '提现失败返还红积分'
|
|
514
|
|
- ]);
|
|
|
489
|
+ if($extract['type']==3){
|
|
|
490
|
+ $user->hongbao = bcadd($user->hongbao,$extract['extract_price'],2);
|
|
|
491
|
+ }else{
|
|
|
492
|
+ $member_brokerage_price = bcadd($user['member_brokerage_price'] ,$extract['extract_price'],2);
|
|
|
493
|
+ //返回余额
|
|
|
494
|
+ $user->member_brokerage_price = $member_brokerage_price;
|
|
|
495
|
+ Db::name('user_rich')->where('uid',$extract['uid'])->inc('red', $extract['extract_price'])->update();
|
|
|
496
|
+ Db::name('user_rich_log')->insert([
|
|
|
497
|
+ 'uid' => $extract['uid'],
|
|
|
498
|
+ 'red' => $extract['extract_price'],
|
|
|
499
|
+ 'pm' => 1,
|
|
|
500
|
+ 'time' => time(),
|
|
|
501
|
+ 'order_id' => 0,
|
|
|
502
|
+ 'mark' => '提现失败返还红积分'
|
|
|
503
|
+ ]);
|
|
|
504
|
+ }
|
|
515
|
505
|
}
|
|
516
|
506
|
$user->save();
|
|
517
|
507
|
}
|
|
|
@@ -520,7 +510,7 @@ class UserExtractRepository extends BaseRepository
|
|
520
|
510
|
// $user->save();
|
|
521
|
511
|
// Db::name('user_sign_score')->where("order_type","extract") -> where("order_id",$id) -> update(['status'=>0]);
|
|
522
|
512
|
}else{
|
|
523
|
|
- if($extract['types']==3){
|
|
|
513
|
+ if($extract['type']==3){
|
|
524
|
514
|
//加入红包出账记录
|
|
525
|
515
|
$insertdata = [
|
|
526
|
516
|
'uid'=> $user->uid,
|