From 497b483526e0334737b419603e662a81c837296c Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Mon, 3 Oct 2022 10:38:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Remote/ModuleController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Remote/ModuleController.php b/app/Http/Controllers/Remote/ModuleController.php index fb4c398..8d1023c 100644 --- a/app/Http/Controllers/Remote/ModuleController.php +++ b/app/Http/Controllers/Remote/ModuleController.php @@ -99,7 +99,7 @@ public function calcModule(Module $module) // end of this month $endOfMonth = now()->endOfMonth(); - $this_month_balance_and_drops = Cache::remember('this_month_balance_and_drops_' . $module->id, 3600, function () use ($module, $beginOfMonth, $endOfMonth) { + $this_month_balance_and_drops = Cache::remember($module->id . '_this_month_balance_and_drops', 3600, function () use ($module, $beginOfMonth, $endOfMonth) { $this_month = Transaction::where('module_id', $module->id)->whereBetween('created_at', [$beginOfMonth, $endOfMonth]); // this month transactions @@ -109,7 +109,7 @@ public function calcModule(Module $module) ]; }); - $last_month_balance_and_drops = Cache::remember('last_month_balance_and_drops_' . $module->id, 3600, function () use ($module, $beginOfMonth, $endOfMonth) { + $last_month_balance_and_drops = Cache::remember($module->id . '_last_month_balance_and_drops', 3600, function () use ($module, $beginOfMonth, $endOfMonth) { // last month transactions $last_moth = Transaction::where('module_id', $module->id)->whereBetween('created_at', [$beginOfMonth, $endOfMonth]);