Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
poc
poc-api
Commits
86641413
Commit
86641413
authored
Sep 01, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: [Ljava.lang.Object; cannot be cast to [Ljava.lang.Integer;
parent
68a8b931
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
PortalRestImpl.java
...main/java/cn/com/poc/portal/rest/impl/PortalRestImpl.java
+4
-4
AiWritingRestImpl.java
.../java/cn/com/poc/writing/rest/impl/AiWritingRestImpl.java
+2
-2
No files found.
src/main/java/cn/com/poc/portal/rest/impl/PortalRestImpl.java
View file @
86641413
...
...
@@ -30,16 +30,16 @@ public class PortalRestImpl implements PortalRest {
@Override
public
void
call
(
PortalDialoguesDto
dto
)
throws
Exception
{
Assert
.
notNull
(
dto
,
"请求参数不能为空"
);
Assert
.
notBlank
(
dto
.
getDialoguesId
(),
"会话ID不能为空"
);
Assert
.
notBlank
(
dto
.
getInput
(),
"对话内容不能为空"
);
Assert
.
notBlank
(
dto
.
getDialoguesId
(),
"会话ID不能为空"
);
Assert
.
notBlank
(
dto
.
getInput
(),
"对话内容不能为空"
);
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
if
(
ObjectUtil
.
isEmpty
(
userBaseEntity
))
{
throw
new
BusinessException
(
"用户未登录"
);
}
KnowledgeDefaultCache
knowledgeDefaultCache
=
new
KnowledgeDefaultCache
();
Integer
[]
defaultKnowledgeId
=
knowledgeDefaultCache
.
getDefaultKnowledgeId
();
Integer
[]
knowledgeId
=
(
Integer
[])
Arrays
.
stream
(
ArrayUtils
.
addAll
(
defaultKnowledgeId
,
dto
.
getKnowledgeIds
())).
distinct
()
.
toArray
();
Integer
[]
knowledgeId
=
Arrays
.
stream
(
ArrayUtils
.
addAll
(
defaultKnowledgeId
,
dto
.
getKnowledgeIds
())).
distinct
()
.
toArray
(
Integer
[]::
new
);
PortalDialoguesCallEntity
callEntity
=
PortalConvert
.
callDtoToEntity
(
dto
);
callEntity
.
setKnowledgeIds
(
knowledgeId
);
...
...
src/main/java/cn/com/poc/writing/rest/impl/AiWritingRestImpl.java
View file @
86641413
...
...
@@ -37,8 +37,8 @@ public class AiWritingRestImpl implements AiWritingRest {
}
KnowledgeDefaultCache
knowledgeDefaultCache
=
new
KnowledgeDefaultCache
();
Integer
[]
defaultKnowledgeId
=
knowledgeDefaultCache
.
getDefaultKnowledgeId
();
Integer
[]
knowledgeId
=
(
Integer
[])
Arrays
.
stream
(
ArrayUtils
.
addAll
(
defaultKnowledgeId
,
aiWritingDto
.
getKnowledgeIds
())).
distinct
()
.
toArray
();
Integer
[]
knowledgeId
=
Arrays
.
stream
(
ArrayUtils
.
addAll
(
defaultKnowledgeId
,
aiWritingDto
.
getKnowledgeIds
())).
distinct
()
.
toArray
(
Integer
[]::
new
);
aiWritingService
.
call
(
aiWritingDto
.
getDialoguesId
(),
aiWritingDto
.
getFileUrl
(),
aiWritingDto
.
getInput
(),
knowledgeId
,
userBaseEntity
.
getUserId
(),
...
...
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