update: add client token in cache

This commit is contained in:
tokumeikoi
2022-04-10 18:08:26 +08:00
parent 447ff0f554
commit e82f28b670
5 changed files with 67 additions and 2 deletions

View File

@ -6,6 +6,8 @@ use App\Jobs\OrderHandleJob;
use App\Models\Order;
use App\Models\Plan;
use App\Models\User;
use App\Utils\CacheKey;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
class OrderService
@ -79,6 +81,8 @@ class OrderService
abort(500, '开通失败');
}
Cache::put(CacheKey::get('SUBSCRIBE_TOKEN', $this->user->token), 1, 120);
DB::commit();
}