master
elf 1 year ago
parent b5b36df605
commit 99542dbc29

@ -4,14 +4,19 @@ declare(strict_types=1);
namespace App\Service;
use App\Exception\BusinessException;
use App\Helper\StringHelper;
use App\Model\RequestLog;
class RequestService extends AbstractService
{
public function getRequestLogByToken($token): ?RequestLog
public function getRequestLogByToken($token): RequestLog
{
return RequestLog::where('request_token', $token)->first();
$requestLog = RequestLog::where('request_token', $token)->first();
if (is_null($requestLog)) {
throw new BusinessException('token不存在');
}
return $requestLog;
}
public function createRequestLog($requestUri, $params): RequestLog

Loading…
Cancel
Save