!40 update crmeb/app/services/activity/lottery/LuckPrizeServices.php.

Merge pull request !40 from 寒冰/N/A
This commit is contained in:
聆听 2021-11-26 08:36:38 +00:00 committed by Gitee
commit 194788e320

View File

@ -173,7 +173,7 @@ class LuckPrizeServices extends BaseServices
if (!$totalChance) return $prize;
$startChance = 0;
mt_srand();
$prizeChance = rand(0, $totalChance);
$prizeChance = rand(0, $totalChance-1);
$newPrize = array_combine(array_column($data, 'type'), $data);
foreach ($data as $item) {
$newStartChance = $item['chance'] + $startChance;