Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ai-chat-agent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李超鹏
ai-chat-agent
Commits
33502dd9
Commit
33502dd9
authored
Dec 26, 2023
by
李超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
token 添加前缀
parent
fba728e6
Pipeline
#7455
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
ChannelTokenService.java
...in/java/cc/shenjiying/ai/manager/ChannelTokenService.java
+7
-0
No files found.
src/main/java/cc/shenjiying/ai/manager/ChannelTokenService.java
View file @
33502dd9
...
...
@@ -3,6 +3,7 @@ package cc.shenjiying.ai.manager;
import
cc.shenjiying.ai.client.QuickSearchApi
;
import
cc.shenjiying.ai.dto.QuickSearchResponse
;
import
cc.shenjiying.ai.dto.VipInfoDTO
;
import
io.quarkus.runtime.util.StringUtil
;
import
jakarta.enterprise.context.ApplicationScoped
;
import
jakarta.inject.Inject
;
import
org.eclipse.microprofile.rest.client.inject.RestClient
;
...
...
@@ -15,6 +16,12 @@ public class ChannelTokenService {
QuickSearchApi
quickSearchApi
;
public
VipInfoDTO
getVip
(
String
channel
,
String
token
)
{
if
(
StringUtil
.
isNullOrEmpty
(
token
))
{
return
null
;
}
if
(!
token
.
startsWith
(
"Bearer "
))
{
token
=
"Bearer "
+
token
;
}
QuickSearchResponse
response
=
quickSearchApi
.
getVip
(
token
);
if
(
response
.
getCode
()
==
0
)
{
return
response
.
getData
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment