feat : config
This commit is contained in:
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
namespace App\Service\Api\Login;
|
||||
|
||||
use App\Cache\Redis\Api\ApiRedisKey;
|
||||
use App\Cache\Redis\Api\UserCache;
|
||||
use App\Cache\Redis\Common\ConfigCache;
|
||||
use App\Cache\Redis\RedisCache;
|
||||
use App\Constants\Common\CouponCode;
|
||||
@@ -73,6 +74,12 @@ abstract class LoginBaseService extends BaseService
|
||||
#[Inject]
|
||||
protected UserInvite $userInviteModel;
|
||||
|
||||
/**
|
||||
* @var UserCache
|
||||
*/
|
||||
#[Inject]
|
||||
protected UserCache $userCache;
|
||||
|
||||
|
||||
/**
|
||||
* 锁定注册
|
||||
@@ -134,7 +141,8 @@ abstract class LoginBaseService extends BaseService
|
||||
/**
|
||||
* 返回值
|
||||
* @return array
|
||||
* @throws Exception
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
protected function getReturn():array
|
||||
{
|
||||
@@ -147,6 +155,7 @@ abstract class LoginBaseService extends BaseService
|
||||
];
|
||||
|
||||
$loginReturn['token'] = $this->cryptoFactory->cryptoClass('jwt', json_encode($loginReturn))->encrypt();
|
||||
$this->userCache->setUserToken($this->userId, $loginReturn['token']);
|
||||
|
||||
|
||||
return $loginReturn;
|
||||
|
||||
Reference in New Issue
Block a user