fix: 全模块Critical安全修复 — 防重入+锁+精度+XSS
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\UsersWallet;
|
||||
use App\Jobs\UpdateBalance as UpdateBalanceJob;
|
||||
class UpdateBalance extends Command
|
||||
{
|
||||
protected $signature = "update_balance";
|
||||
protected $description = "更新用户余额";
|
||||
public function handle()
|
||||
{
|
||||
$this->comment("开始执行");
|
||||
UsersWallet::chunk(100, function ($wallets) {
|
||||
$wallets->each(function ($item, $key) {
|
||||
UpdateBalanceJob::dispatch($item)->onQueue('update:block:balance');
|
||||
});
|
||||
});
|
||||
$this->comment("执行完成");
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user