优化-实例化奖励列表到缓存中
This commit is contained in:
@@ -57,7 +57,7 @@ class GameController extends OpenController
|
||||
*/
|
||||
public function lotteryPool(Request $request): Response
|
||||
{
|
||||
$list = DiceRewardConfig::order('id', 'asc')->select()->toArray();
|
||||
$list = DiceRewardConfig::getCachedList();
|
||||
return $this->success($list);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class GameController extends OpenController
|
||||
if (!$player) {
|
||||
return $this->fail('用户不存在', ReturnCode::NOT_FOUND);
|
||||
}
|
||||
$minEv = (float) DiceRewardConfig::min('real_ev');
|
||||
$minEv = DiceRewardConfig::getCachedMinRealEv();
|
||||
$minCoin = abs($minEv + 100);
|
||||
$coin = (float) $player->coin;
|
||||
if ($coin < $minCoin) {
|
||||
|
||||
Reference in New Issue
Block a user