This commit is contained in:
Tokumeikoi 2020-04-26 19:19:31 +08:00
parent 99117cca58
commit ba1c4ffa00
2 changed files with 3 additions and 8 deletions

View File

@ -86,8 +86,8 @@ class DeepbworkController extends Controller
$serverService->log(
$item['user_id'],
$request->input('node_id'),
$u,
$d,
$item['u'],
$item['d'],
$server->rate
);
}

View File

@ -60,17 +60,12 @@ class ServerController extends Controller
case 2:
$serverLogModel->where('created_at', '>=', strtotime(date('Y-m-1')));
}
$sum = [
'u' => $serverLogModel->sum('u'),
'd' => $serverLogModel->sum('d')
];
$total = $serverLogModel->count();
$res = $serverLogModel->forPage($current, $pageSize)
->get();
return response([
'data' => $res,
'total' => $total,
'sum' => $sum
'total' => $total
]);
}
}