From ba1c4ffa002a9fe4592585e7cb769de4bd864f2e Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Sun, 26 Apr 2020 19:19:31 +0800 Subject: [PATCH] update --- app/Http/Controllers/Server/DeepbworkController.php | 4 ++-- app/Http/Controllers/User/ServerController.php | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/Server/DeepbworkController.php b/app/Http/Controllers/Server/DeepbworkController.php index 9349f524..96f03406 100644 --- a/app/Http/Controllers/Server/DeepbworkController.php +++ b/app/Http/Controllers/Server/DeepbworkController.php @@ -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 ); } diff --git a/app/Http/Controllers/User/ServerController.php b/app/Http/Controllers/User/ServerController.php index 913003f1..871393ce 100644 --- a/app/Http/Controllers/User/ServerController.php +++ b/app/Http/Controllers/User/ServerController.php @@ -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 ]); } }