|
|
@@ -2714,19 +2714,21 @@ class UserRepository extends BaseRepository
|
|
|
$userBillRepository = app()->make(UserBillRepository::class);
|
|
|
$price = $this->awardIntegralPrice();
|
|
|
@file_put_contents('quanju.txt',json_encode($price)."-积分金额\r\n",8);
|
|
|
- $all_price = bcmul($num, $price['price']);
|
|
|
+ $all_price = bcmul($num, $price['price'],2);
|
|
|
if ($all_price > $info['award_range']) $all_price = $info['award_range'];
|
|
|
|
|
|
if ($all_price > 0) {
|
|
|
$commission2 = $all_price;
|
|
|
- $commission = systemConfig('extract_commission', 0);
|
|
|
+ $commission = systemConfig('extract_commission', 0.06);
|
|
|
@file_put_contents('quanju2.txt',$commission."-手续费比例\r\n",8);
|
|
|
-
|
|
|
- $all_price2 = bcmul((string)$all_price, (string)$commission,2); //手续费
|
|
|
- @file_put_contents('quanju2.txt',$commission."-手续费\r\n",8);
|
|
|
+ if ($commission > 0){
|
|
|
+ $all_price2 = bcmul((string)$all_price, (string)$commission,2); //手续费
|
|
|
+ @file_put_contents('quanju2.txt',$commission."-手续费\r\n",8);
|
|
|
// $commission2 = bcsub($commission2,$all_price,2); //回奖池的手续费
|
|
|
- $all_price = bcsub($all_price,$all_price2,2); //奖金减手续费
|
|
|
- @file_put_contents('quanju2.txt',$all_price."-减掉手续费的金额\r\n",8);
|
|
|
+ $all_price = bcsub($all_price,$all_price2,2); //奖金减手续费
|
|
|
+ @file_put_contents('quanju2.txt',$all_price."-减掉手续费的金额\r\n",8);
|
|
|
+ }
|
|
|
+
|
|
|
//用户获得$all_price的佣金
|
|
|
$userBillRepository->incBill($uid, 'brokerage', 'extract_award', [
|
|
|
'link_id' => 0,
|