|
@@ -7,6 +7,7 @@ use app\middleware\Log;
|
|
|
use think\facade\Cache;
|
|
use think\facade\Cache;
|
|
|
use ReflectionException;
|
|
use ReflectionException;
|
|
|
use app\middleware\Safe;
|
|
use app\middleware\Safe;
|
|
|
|
|
+use think\file\UploadedFile;
|
|
|
use \think\response\Json;
|
|
use \think\response\Json;
|
|
|
use think\facade\Request;
|
|
use think\facade\Request;
|
|
|
use think\admin\Controller;
|
|
use think\admin\Controller;
|
|
@@ -519,8 +520,9 @@ class Index extends Controller
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 如果参与活动人数 5000人内 有人中奖过,那么不在计算。
|
|
// 如果参与活动人数 5000人内 有人中奖过,那么不在计算。
|
|
|
|
|
+ $limit = 5000;
|
|
|
$total = $logCount + 1;
|
|
$total = $logCount + 1;
|
|
|
- if ($orderCount == floor($total/2)) {
|
|
|
|
|
|
|
+ if ($orderCount == floor($total/$limit)) {
|
|
|
$isWinAward = 0;
|
|
$isWinAward = 0;
|
|
|
$giftId = 0;
|
|
$giftId = 0;
|
|
|
break;
|
|
break;
|
|
@@ -536,7 +538,7 @@ class Index extends Controller
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 如果参与活动人数 5000人内 还没有人中奖那最后一人必中。
|
|
// 如果参与活动人数 5000人内 还没有人中奖那最后一人必中。
|
|
|
- if ($orderCount < floor($total/2) && $isWinAward ==0 && ($total%2) == 0) {
|
|
|
|
|
|
|
+ if ($orderCount < floor($total/$limit) && $isWinAward ==0 && ($total%$limit) == 0) {
|
|
|
$isWinAward = 1;
|
|
$isWinAward = 1;
|
|
|
$giftId = $gift['id'];
|
|
$giftId = $gift['id'];
|
|
|
break;
|
|
break;
|