改进 计费
This commit is contained in:
parent
497b483526
commit
02731ddd39
@ -138,6 +138,8 @@ public function cost($price = null, $auto = true)
|
||||
|
||||
Cache::put($month_cache_key, $hosts_drops, 604800);
|
||||
|
||||
$this->price *= config('drops.decimal');
|
||||
|
||||
$transaction->reduceDrops($this->user_id, $this->id, $this->module_id, $auto, $this->price);
|
||||
|
||||
broadcast(new UserEvent($this->user_id, 'balances.drops.reduced', $this->user));
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
use Jenssegers\Mongodb\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class Transaction extends Model
|
||||
{
|
||||
@ -122,6 +123,7 @@ public function reduceDrops($user_id, $host_id, $module_id, $auto = 1, $amount =
|
||||
}
|
||||
|
||||
$this->addPayoutDrops($user_id, $amount / $decimal, $description, $host_id, $module_id);
|
||||
// $this->addPayoutDrops($user_id, $amount, $description, $host_id, $module_id);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user