WIN-2308041133\Administrator пре 5 месеци
родитељ
комит
3d1ba13040
1 измењених фајлова са 5 додато и 4 уклоњено
  1. 5 4
      app/common/repositories/user/UserRepository.php

+ 5 - 4
app/common/repositories/user/UserRepository.php

@@ -2788,10 +2788,11 @@ class UserRepository extends BaseRepository
 //                    @file_put_contents('quanju2.txt', $all_price . "-减掉手续费的金额\r\n", 8);
 //                }
 //                可提现奖金和份额
-                @file_put_contents('quanju2.txt', $all_price . "-金额\r\n", 8);
-                $award = bcsub($all_price, $info['award_range'], 2);
-                @file_put_contents('quanju2.txt', $all_price . "-金额\r\n", 8);
-                $this->addFrozenBrokerage($uid, $award);  //冻结奖金
+                if ($all_price > $info['award_range']){
+                    $award = bcsub($all_price, $info['award_range'], 2);
+                    $this->addFrozenBrokerage($uid, $award);  //冻结奖金
+                    $all_price = bcsub($all_price, $award, 2);  //奖金减冻结奖金
+                }
 
                 //用户获得$all_price的佣金
                 $userBillRepository->incBill($uid, 'brokerage', 'extract_award', [