改进
This commit is contained in:
parent
dec8ef5874
commit
db328a022f
@ -113,12 +113,6 @@ public function reduceDrops($user_id, $host_id, $module_id, $auto = 1, $amount =
|
||||
|
||||
$decimal = config('drops.decimal');
|
||||
|
||||
$month = now()->month;
|
||||
|
||||
Cache::increment('user_' . $user_id . '_month_' . $month . '_drops', $amount);
|
||||
|
||||
$amount = $amount * $decimal;
|
||||
|
||||
Cache::decrement($cache_key, $amount);
|
||||
|
||||
if ($auto) {
|
||||
@ -145,6 +139,10 @@ 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);
|
||||
|
||||
return $this->addLog($user_id, $data);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user