Просмотр исходного кода

Merge branch 'master' of https://gitee.com/ZhongBangKeJi/CRMEB

evoxwht 4 лет назад
Родитель
Сommit
b7b832c98e

+ 1 - 1
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)。
 

+ 1 - 1
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);
     }
 
     /**

+ 1 - 1
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;