update: fix

This commit is contained in:
tokumeikoi 2021-09-21 19:11:14 +09:00
parent 6ab9a4d54d
commit 30b3587771
2 changed files with 3 additions and 3 deletions

View File

@ -95,7 +95,7 @@ class StatController extends Controller
'trojan' => ServerTrojan::where('parent_id', null)->get()->toArray() 'trojan' => ServerTrojan::where('parent_id', null)->get()->toArray()
]; ];
$timestamp = strtotime('-1 day', strtotime(date('Y-m-d'))); $timestamp = strtotime('-1 day', strtotime(date('Y-m-d')));
$statistics = StatServerV2ray::select([ $statistics = StatServer::select([
'server_id', 'server_id',
'server_type', 'server_type',
'u', 'u',

View File

@ -36,7 +36,7 @@ class StatServerJob implements ShouldQueue
public function handle() public function handle()
{ {
$statistic = $this->statistic; $statistic = $this->statistic;
$data = StatServerV2ray::where('record_at', $statistic['record_at']) $data = StatServer::where('record_at', $statistic['record_at'])
->where('server_id', $statistic['server_id']) ->where('server_id', $statistic['server_id'])
->first(); ->first();
if ($data) { if ($data) {
@ -46,7 +46,7 @@ class StatServerJob implements ShouldQueue
abort(500, '节点统计数据更新失败'); abort(500, '节点统计数据更新失败');
} }
} else { } else {
if (!StatServerV2ray::create($statistic)) { if (!StatServer::create($statistic)) {
abort(500, '节点统计数据创建失败'); abort(500, '节点统计数据创建失败');
} }
} }