diff --git a/README.md b/README.md index 5d0f7a7e8..244ce24b0 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ CRMEB Min是一款轻量级、高性能开源电商商城系统,采用TP6+Mysq 感谢大神们提交代码(排名不分先后) -### @yizhisamoye,@bys1123,@xaboy,@youngxj0,@jacklincheung,@392256866 +### @yizhisamoye,@bys1123,@xaboy,@youngxj0,@jacklincheung,@392256866,@sxsea 欢迎反馈问题 [反馈问题](https://gitee.com/ZhongBangKeJi/CRMEB/issues)。 diff --git a/crmeb/app/model/activity/lottery/LuckLotteryRecord.php b/crmeb/app/model/activity/lottery/LuckLotteryRecord.php index 2fcfd7071..b3f26b765 100644 --- a/crmeb/app/model/activity/lottery/LuckLotteryRecord.php +++ b/crmeb/app/model/activity/lottery/LuckLotteryRecord.php @@ -203,7 +203,7 @@ class LuckLotteryRecord extends BaseModel */ public function searchIsReceiveAttr($query, $value) { - if ($value !== '') $query->where('is_reveive', $value); + if ($value !== '') $query->where('is_receive', $value); } /** diff --git a/crmeb/app/services/activity/lottery/LuckPrizeServices.php b/crmeb/app/services/activity/lottery/LuckPrizeServices.php index d8b65f0fb..709aaf6cc 100644 --- a/crmeb/app/services/activity/lottery/LuckPrizeServices.php +++ b/crmeb/app/services/activity/lottery/LuckPrizeServices.php @@ -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;