Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ask_data_ai_admin
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
linyangyang
ask_data_ai_admin
Commits
4c8bb7c1
Commit
4c8bb7c1
authored
Jul 14, 2025
by
林洋洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cookie 改为入参
parent
6f0ef400
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
ChatController.java
...-biz/src/main/java/com/ask/controller/ChatController.java
+1
-1
ChatConversationController.java
...n/java/com/ask/controller/ChatConversationController.java
+2
-2
CorsConfig.java
...ommon/src/main/java/com/ask/common/config/CorsConfig.java
+1
-1
No files found.
ask-data-ai/ask-data-ai-biz/src/main/java/com/ask/controller/ChatController.java
View file @
4c8bb7c1
...
...
@@ -46,7 +46,7 @@ public class ChatController {
@Operation
(
summary
=
"创建对话"
,
description
=
"创建对话"
)
@GetMapping
(
"/create/client"
)
public
R
<
ChatConversation
>
getConversationId
(
@Parameter
(
description
=
"智能体ID"
)
@RequestParam
Integer
agentId
,
@
CookieValue
(
value
=
"userId"
)
Long
userId
)
{
@
Parameter
(
description
=
"用户ID"
)
@RequestParam
Long
userId
)
{
if
(
Objects
.
isNull
(
agentId
))
{
throw
new
RuntimeException
(
"userID不能为NULL!"
);
}
...
...
ask-data-ai/ask-data-ai-biz/src/main/java/com/ask/controller/ChatConversationController.java
View file @
4c8bb7c1
...
...
@@ -82,7 +82,7 @@ public class ChatConversationController {
@GetMapping
(
"/page"
)
public
R
<
IPage
<
ChatConversation
>>
getPage
(
@Parameter
(
description
=
"分页对象"
)
Page
page
,
@Parameter
(
description
=
"智能体Id"
)
@RequestParam
(
required
=
false
)
Integer
agentId
,
@
CookieValue
(
value
=
"userId"
)
Long
userId
)
{
@
Parameter
(
description
=
"用户ID"
)
@RequestParam
Long
userId
)
{
if
(
Objects
.
isNull
(
userId
)){
throw
new
RuntimeException
(
"userID 不能为NULL!"
);
}
...
...
@@ -127,7 +127,7 @@ public class ChatConversationController {
@Operation
(
summary
=
"修改对话记录"
,
description
=
"修改对话记录"
)
@PutMapping
public
R
<
Boolean
>
updateById
(
@Parameter
(
description
=
"对话记录"
)
@RequestBody
ChatConversation
chatConversation
,
@
CookieValue
(
value
=
"userId"
,
defaultValue
=
"0"
)
Long
userId
)
{
@
Parameter
(
description
=
"用户ID"
)
@RequestParam
Long
userId
)
{
if
(
Objects
.
isNull
(
userId
)){
throw
new
RuntimeException
(
"userID 不能为NULL!"
);
}
...
...
ask-data-ai/ask-data-ai-common/src/main/java/com/ask/common/config/CorsConfig.java
View file @
4c8bb7c1
...
...
@@ -11,7 +11,7 @@ public class CorsConfig {
private
CorsConfiguration
buildConfig
()
{
CorsConfiguration
corsConfiguration
=
new
CorsConfiguration
();
// 使用addAllowedOriginPattern代替addAllowedOrigin
corsConfiguration
.
addAllowedOriginPattern
(
"*"
);
// 1允许任何域名使用
corsConfiguration
.
addAllowedOriginPattern
(
"*"
);
corsConfiguration
.
addAllowedHeader
(
"*"
);
// 2允许任何头
corsConfiguration
.
addAllowedMethod
(
"*"
);
// 3允许任何方法(post、get等)
corsConfiguration
.
setAllowCredentials
(
true
);
// 支持安全证书。跨域携带cookie需要配置这个
...
...
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