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
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
poc
poc-api
Commits
3c874756
Commit
3c874756
authored
Jun 20, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复长文档接口异常
parent
b9343878
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
1 deletion
+36
-1
AiDialoguesService.java
...cn/com/poc/ai_dialogues/aggregate/AiDialoguesService.java
+12
-0
AiDialoguesServiceImpl.java
...c/ai_dialogues/aggregate/impl/AiDialoguesServiceImpl.java
+4
-0
AiDialoguesRestImpl.java
...n/com/poc/ai_dialogues/rest/impl/AiDialoguesRestImpl.java
+4
-0
BizAiDialoguesService.java
...n/com/poc/ai_dialogues/service/BizAiDialoguesService.java
+3
-1
BizAiDialoguesServiceImpl.java
.../ai_dialogues/service/impl/BizAiDialoguesServiceImpl.java
+13
-0
No files found.
src/main/java/cn/com/poc/ai_dialogues/aggregate/AiDialoguesService.java
View file @
3c874756
...
...
@@ -14,9 +14,21 @@ public interface AiDialoguesService {
/**
* 创建对话
*
* @param type 对话类型
* @param userId 用户ID
*/
String
create
(
AiDialoguesTypeEnum
type
,
Long
userId
)
throws
Exception
;
/**
* 创建对话
*
* @param fileUrl 文件地址
* @param type 对话类型
* @param userId 用户ID
*/
String
create
(
AiDialoguesTypeEnum
type
,
String
fileUrl
,
Long
userId
)
throws
Exception
;
/**
* 获取对话详情
...
...
src/main/java/cn/com/poc/ai_dialogues/aggregate/impl/AiDialoguesServiceImpl.java
View file @
3c874756
...
...
@@ -47,6 +47,10 @@ public class AiDialoguesServiceImpl implements AiDialoguesService {
return
bizAiDialoguesService
.
create
(
type
.
getType
(),
userId
);
}
@Override
public
String
create
(
AiDialoguesTypeEnum
type
,
String
fileUrl
,
Long
userId
)
throws
Exception
{
return
bizAiDialoguesService
.
create
(
type
.
getType
(),
fileUrl
,
userId
);
}
@Override
public
AiDialoguesRecordDto
dialoguesDetail
(
String
dialoguesId
,
Long
userId
)
throws
Exception
{
...
...
src/main/java/cn/com/poc/ai_dialogues/rest/impl/AiDialoguesRestImpl.java
View file @
3c874756
...
...
@@ -7,6 +7,7 @@ import cn.com.poc.ai_dialogues.dto.BatchDelAiDialoguesDto;
import
cn.com.poc.ai_dialogues.rest.AiDialoguesRest
;
import
cn.com.poc.common.utils.Assert
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.common.utils.StringUtils
;
import
cn.com.poc.expose.dto.DialoguesContextDto
;
import
cn.com.poc.support.security.oauth.entity.UserBaseEntity
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
...
...
@@ -30,6 +31,9 @@ public class AiDialoguesRestImpl implements AiDialoguesRest {
if
(
ObjectUtil
.
isEmpty
(
userBaseEntity
))
{
throw
new
BusinessException
(
"用户未登录"
);
}
if
(
StringUtils
.
isNotBlank
(
fileUrl
))
{
return
aiDialoguesService
.
create
(
AiDialoguesTypeEnum
.
getByType
(
type
),
fileUrl
,
userBaseEntity
.
getUserId
());
}
return
aiDialoguesService
.
create
(
AiDialoguesTypeEnum
.
getByType
(
type
),
userBaseEntity
.
getUserId
());
}
...
...
src/main/java/cn/com/poc/ai_dialogues/service/BizAiDialoguesService.java
View file @
3c874756
...
...
@@ -14,7 +14,9 @@ public interface BizAiDialoguesService extends BaseService {
* @param userId
* @return
*/
String
create
(
String
type
,
Long
userId
);
String
create
(
String
type
,
Long
userId
);
String
create
(
String
type
,
String
fileUrl
,
Long
userId
);
BizAiDialoguesEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
;
...
...
src/main/java/cn/com/poc/ai_dialogues/service/impl/BizAiDialoguesServiceImpl.java
View file @
3c874756
...
...
@@ -36,6 +36,19 @@ public class BizAiDialoguesServiceImpl extends BaseServiceImpl
return
dialoguesId
;
}
@Override
public
String
create
(
String
type
,
String
fileUrl
,
Long
userId
)
{
String
dialoguesId
=
type
+
"_"
+
UUIDTool
.
getUUID
();
BizAiDialoguesModel
model
=
new
BizAiDialoguesModel
();
model
.
setDialoguesId
(
dialoguesId
);
model
.
setDialoguesType
(
type
);
model
.
setFileUrl
(
fileUrl
);
model
.
setMemberId
(
userId
);
this
.
repository
.
save
(
model
);
return
dialoguesId
;
}
public
BizAiDialoguesEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
{
Assert
.
notNull
(
id
);
BizAiDialoguesModel
model
=
this
.
repository
.
get
(
id
);
...
...
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