WIN-2308041133\Administrator 4 ヶ月 前
コミット
1690c87792
1 ファイル変更6 行追加3 行削除
  1. 6 3
      app/common/repositories/user/UserRepository.php

+ 6 - 3
app/common/repositories/user/UserRepository.php

@@ -2794,7 +2794,7 @@ class UserRepository extends BaseRepository
             @file_put_contents('quanju.txt',$num. "-手动提现积分\r\n", 8);
             $all_price = bcmul($num, $price['price'], 2);
 //            if ($all_price > $info['award_range']) $all_price = $info['award_range'];
-
+            @file_put_contents('quanju.txt',$all_price. "-提现总金额\r\n", 8);
             if ($all_price > 0) {
 //                $commission2 = $all_price;
 //                $commission = systemConfig('extract_commission', 0.06);
@@ -2815,8 +2815,11 @@ class UserRepository extends BaseRepository
                     @file_put_contents('quanju.txt', $award . "-总金额扣除份额就是还要冻结的金额\r\n", 8);
                     $this->addFrozenBrokerage($uid, $award);  //冻结奖金
                     $all_price = bcsub($all_price, $award, 2);  //奖金减冻结奖金
-
+                }elseif($all_price < $info['award_range']&&$num ==0){  //达不到自动提现的份额,而且不是手动提现
+                    return true;
+                }
                 @file_put_contents('quanju.txt', $all_price . "-扣除金额后提现的金额\r\n", 8);
+
                 //用户获得$all_price的佣金
                 $userBillRepository->incBill($uid, 'brokerage', 'extract_award', [
                     'link_id' => 0,
@@ -2858,7 +2861,7 @@ class UserRepository extends BaseRepository
                     'balance' => bcsub($info['award_integral'], $num, 2)
                 ]);
                 $userRepository->decField($uid, 'award_integral', $num);
-            }
+
             }
         }
         return true;