seven hai 2 meses
pai
achega
be547c3431
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      app/Services/BetService.php

+ 4 - 2
app/Services/BetService.php

@@ -641,13 +641,15 @@ class BetService extends BaseService
             // $lastStr = self::getLastChar($v['first_name'], 1);
             $lastStr = self::hideMiddleDigits($v['member_id'], 4);
             if (in_array($v['keywords'], $awards)) {
-                $profit = $v['amount'] * $v['odds'];
+                $amount = (float)$v['amount'];
+                $odds = (float)$v['odds'];
+                $profit = $amount * $odds;
                 if ($profit > 880000) {
                     $profit = 880000; // 单注最高奖金880000
                 }
                 $item['profit'] = $profit;
 
-                $yl = $profit - $v['amount'];
+                $yl = $profit - $amount;
                 if ($k + 1 <= $rand_num) {
                     $text .= "{$v['keywords']} 【" . $lastStr . "】 {$v['amount']} {$profit} {$yl}\n";
                 }