|
|
@@ -357,7 +357,7 @@ class UserExtractRepository extends BaseRepository
|
|
357
|
357
|
return false;
|
|
358
|
358
|
}
|
|
359
|
359
|
if ($data["extract_type"]==3){
|
|
360
|
|
- $data = Db::transaction(function()use($user,$data, $type){
|
|
|
360
|
+ $data = Db::transaction(function()use($user,$data, $type,$uid){
|
|
361
|
361
|
if($type==1){
|
|
362
|
362
|
$brokerage_price = bcsub($user['brokerage_price'],$data['extract_price'],2);
|
|
363
|
363
|
$user->brokerage_price = $brokerage_price;
|
|
|
@@ -371,6 +371,21 @@ class UserExtractRepository extends BaseRepository
|
|
371
|
371
|
|
|
372
|
372
|
$user->save();
|
|
373
|
373
|
|
|
|
374
|
+ if($type == 3){
|
|
|
375
|
+ //加入红包提现记录
|
|
|
376
|
+ $insertdata = [
|
|
|
377
|
+ 'uid'=> $uid,
|
|
|
378
|
+ 'number' => $data['extract_price'],
|
|
|
379
|
+ 'surplus' => $user->hongbao,
|
|
|
380
|
+ 'mark' => '红包提现',
|
|
|
381
|
+ 'type' => 2,
|
|
|
382
|
+ 'status' => -1,
|
|
|
383
|
+ 'addtime' => time(),
|
|
|
384
|
+ ];
|
|
|
385
|
+ Db::name('user_sign_hongbao')->insertGetId($insertdata);
|
|
|
386
|
+ }
|
|
|
387
|
+
|
|
|
388
|
+
|
|
374
|
389
|
$service_money=bcmul($data['extract_price'],'0.1',2);
|
|
375
|
390
|
$data['service_money']=$service_money;
|
|
376
|
391
|
$data['status'] = 0;
|
|
|
@@ -411,6 +426,23 @@ class UserExtractRepository extends BaseRepository
|
|
411
|
426
|
$service_money_yihu= bcmul($tea_price,'0.1',2);
|
|
412
|
427
|
}
|
|
413
|
428
|
}
|
|
|
429
|
+
|
|
|
430
|
+
|
|
|
431
|
+ if($type == 3){
|
|
|
432
|
+ //加入红包提现记录
|
|
|
433
|
+ $insertdata = [
|
|
|
434
|
+ 'uid'=> $uid,
|
|
|
435
|
+ 'number' => $data['extract_price'],
|
|
|
436
|
+ 'surplus' => $user->hongbao,
|
|
|
437
|
+ 'mark' => '红包提现',
|
|
|
438
|
+ 'type' => 2,
|
|
|
439
|
+ 'status' => -1,
|
|
|
440
|
+ 'addtime' => time(),
|
|
|
441
|
+ ];
|
|
|
442
|
+ Db::name('user_sign_hongbao')->insertGetId($insertdata);
|
|
|
443
|
+ }
|
|
|
444
|
+
|
|
|
445
|
+
|
|
414
|
446
|
// if($extract_price_yihu>0){
|
|
415
|
447
|
$insertAll[]=array(
|
|
416
|
448
|
'extract_id'=>$extract->extract_id,
|