移除 Drops 记录

This commit is contained in:
iVampireSP.com 2022-10-03 12:07:17 +08:00
parent 61544bdec4
commit a030086778
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 8 additions and 3 deletions

View File

@ -211,7 +211,7 @@ public function drops()
$resp = [
'drops' => $transactions->getDrops($user_id),
'monthly_usages' => (float) Cache::get($cache_key, 0),
'monthly_usages' => (double) Cache::get($cache_key, 0),
'rate' => config('drops.rate'),
'decimal' => config('drops.decimal'),
];

View File

@ -141,9 +141,14 @@ public function addPayoutDrops($user_id, $amount, $description, $host_id, $modul
'module_id' => $module_id,
];
$month = now()->month;
Cache::increment('user_' . $user_id . '_month_' . $month . '_drops', $amount);
// $amount = (double) $amount;
// Log::debug($amount);
// $month = now()->month;
// Cache::increment('user_' . $user_id . '_month_' . $month . '_drops', $amount);
return $this->addLog($user_id, $data);
}