完善接口和后台页面
This commit is contained in:
@@ -89,7 +89,6 @@ final class GameLiveService
|
||||
'user_id' => (int) $row['user_id'],
|
||||
'period_no' => (string) $row['period_no'],
|
||||
'pick_numbers' => $row['pick_numbers'],
|
||||
'unit_amount' => (string) $row['unit_amount'],
|
||||
'total_amount' => (string) $row['total_amount'],
|
||||
'streak_at_bet' => (int) $row['streak_at_bet'],
|
||||
'create_time' => (int) $row['create_time'],
|
||||
@@ -303,10 +302,10 @@ final class GameLiveService
|
||||
if (!in_array($number, array_map('intval', $pickNumbers), true)) {
|
||||
continue;
|
||||
}
|
||||
$unit = (string) ($bet['unit_amount'] ?? '0');
|
||||
$total = (string) ($bet['total_amount'] ?? '0');
|
||||
$streak = (int) ($bet['streak_at_bet'] ?? 0);
|
||||
$odds = (string) (($streak + 1) * self::BASE_ODDS);
|
||||
$orderPayout = bcmul($unit, $odds, 4);
|
||||
$orderPayout = bcmul($total, $odds, 4);
|
||||
$payout = bcadd($payout, $orderPayout, 4);
|
||||
}
|
||||
return $payout;
|
||||
|
||||
Reference in New Issue
Block a user