新版流量池提交

This commit is contained in:
wong
2026-02-04 11:02:33 +08:00
parent a20794366a
commit 2855ab80fb
68 changed files with 8957 additions and 714 deletions

View File

@@ -41,11 +41,18 @@ class AllotRuleController extends BaseController
$result = requestCurl($this->baseUrl . 'api/AllotRule/all', [], 'GET', $header);
$response = handleApiResponse($result);
// 确保 response 是数组格式
if (!is_array($response)) {
$response = [];
}
// 保存数据到数据库
if (!empty($response)) {
AllotRuleModel::where('1=1')->update(['isDel' => 1]);
foreach ($response as $item) {
$this->saveAllotRule($item);
if (is_array($item)) {
$this->saveAllotRule($item);
}
}
}