1.游戏配置实时生效
This commit is contained in:
@@ -8,6 +8,7 @@ use app\common\library\game\DepositTier;
|
|||||||
use app\common\library\game\FinanceCashierConfig;
|
use app\common\library\game\FinanceCashierConfig;
|
||||||
use app\common\library\game\StreakWinReward;
|
use app\common\library\game\StreakWinReward;
|
||||||
use app\common\library\game\ZiHuaDictionary as ZiHuaDictionaryLib;
|
use app\common\library\game\ZiHuaDictionary as ZiHuaDictionaryLib;
|
||||||
|
use app\common\service\GameHotDataCoordinator;
|
||||||
use support\think\Db;
|
use support\think\Db;
|
||||||
use support\Response;
|
use support\Response;
|
||||||
use Webman\Http\Request as WebmanRequest;
|
use Webman\Http\Request as WebmanRequest;
|
||||||
@@ -184,6 +185,7 @@ class GameConfig extends Backend
|
|||||||
}
|
}
|
||||||
|
|
||||||
$now = time();
|
$now = time();
|
||||||
|
$updatedKeys = [];
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
foreach ($items as $configKey => $configValue) {
|
foreach ($items as $configKey => $configValue) {
|
||||||
@@ -211,6 +213,7 @@ class GameConfig extends Backend
|
|||||||
'config_value' => (string) $persistValue,
|
'config_value' => (string) $persistValue,
|
||||||
'update_time' => $now,
|
'update_time' => $now,
|
||||||
]);
|
]);
|
||||||
|
$updatedKeys[] = $configKey;
|
||||||
}
|
}
|
||||||
Db::commit();
|
Db::commit();
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
@@ -218,6 +221,10 @@ class GameConfig extends Backend
|
|||||||
return $this->error($e->getMessage());
|
return $this->error($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (array_values(array_unique($updatedKeys)) as $key) {
|
||||||
|
GameHotDataCoordinator::afterGameConfigKeyCommitted($key);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->success(__('Operation completed'));
|
return $this->success(__('Operation completed'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user