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
94f4a2e9
Commit
94f4a2e9
authored
Jun 20, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复长文档接口异常
parent
36f468ff
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
103 additions
and
313 deletions
+103
-313
BizAgentApplicationDialoguesRecordConvert.java
...on/convert/BizAgentApplicationDialoguesRecordConvert.java
+4
-0
BizAgentApplicationDialoguesRecordDto.java
...pplication/dto/BizAgentApplicationDialoguesRecordDto.java
+15
-0
BizAgentApplicationDialoguesRecordEntity.java
...tion/entity/BizAgentApplicationDialoguesRecordEntity.java
+13
-0
BizAgentApplicationDialoguesRecordModel.java
...cation/model/BizAgentApplicationDialoguesRecordModel.java
+15
-0
LongTextDialoguesService.java
...poc/long_document/aggregate/LongTextDialoguesService.java
+0
-11
LongTextDialoguesServiceImpl.java
...document/aggregate/impl/LongTextDialoguesServiceImpl.java
+50
-181
LongTextDialoguesRest.java
.../cn/com/poc/long_document/rest/LongTextDialoguesRest.java
+3
-52
LongTextDialoguesRestImpl.java
...oc/long_document/rest/impl/LongTextDialoguesRestImpl.java
+3
-69
No files found.
src/main/java/cn/com/poc/agent_application/convert/BizAgentApplicationDialoguesRecordConvert.java
View file @
94f4a2e9
...
...
@@ -16,6 +16,7 @@ public class BizAgentApplicationDialoguesRecordConvert {
entity
.
setContent
(
model
.
getContent
());
entity
.
setReasoningContent
(
model
.
getReasoningContent
());
entity
.
setImageUrl
(
model
.
getImageUrl
());
entity
.
setFileUrl
(
model
.
getFileUrl
());
entity
.
setDialogsId
(
model
.
getDialogsId
());
entity
.
setTimestamp
(
model
.
getTimestamp
());
entity
.
setIsDeleted
(
model
.
getIsDeleted
());
...
...
@@ -37,6 +38,7 @@ public class BizAgentApplicationDialoguesRecordConvert {
model
.
setContent
(
entity
.
getContent
());
model
.
setReasoningContent
(
entity
.
getReasoningContent
());
model
.
setImageUrl
(
entity
.
getImageUrl
());
model
.
setFileUrl
(
entity
.
getFileUrl
());
model
.
setTimestamp
(
entity
.
getTimestamp
());
model
.
setIsDeleted
(
entity
.
getIsDeleted
());
model
.
setCreator
(
entity
.
getCreator
());
...
...
@@ -57,6 +59,7 @@ public class BizAgentApplicationDialoguesRecordConvert {
dto
.
setContent
(
entity
.
getContent
());
dto
.
setReasoningContent
(
entity
.
getReasoningContent
());
dto
.
setImageUrl
(
entity
.
getImageUrl
());
dto
.
setFileUrl
(
entity
.
getFileUrl
());
dto
.
setTimestamp
(
entity
.
getTimestamp
());
dto
.
setIsDeleted
(
entity
.
getIsDeleted
());
dto
.
setCreator
(
entity
.
getCreator
());
...
...
@@ -77,6 +80,7 @@ public class BizAgentApplicationDialoguesRecordConvert {
entity
.
setContent
(
dto
.
getContent
());
entity
.
setReasoningContent
(
dto
.
getReasoningContent
());
entity
.
setImageUrl
(
dto
.
getImageUrl
());
entity
.
setFileUrl
(
dto
.
getFileUrl
());
entity
.
setTimestamp
(
dto
.
getTimestamp
());
entity
.
setIsDeleted
(
dto
.
getIsDeleted
());
entity
.
setCreator
(
dto
.
getCreator
());
...
...
src/main/java/cn/com/poc/agent_application/dto/BizAgentApplicationDialoguesRecordDto.java
View file @
94f4a2e9
...
...
@@ -117,6 +117,21 @@ public class BizAgentApplicationDialoguesRecordDto {
this
.
imageUrl
=
imageUrl
;
}
/**
* file_url
* 文件地址
*/
private
java
.
lang
.
String
fileUrl
;
public
String
getFileUrl
()
{
return
fileUrl
;
}
public
void
setFileUrl
(
String
fileUrl
)
{
this
.
fileUrl
=
fileUrl
;
}
/**
* timestamp
* 时间戳
...
...
src/main/java/cn/com/poc/agent_application/entity/BizAgentApplicationDialoguesRecordEntity.java
View file @
94f4a2e9
...
...
@@ -103,6 +103,19 @@ public class BizAgentApplicationDialoguesRecordEntity {
this
.
imageUrl
=
imageUrl
;
}
/**
* 文件地址
*/
private
java
.
lang
.
String
fileUrl
;
public
String
getFileUrl
()
{
return
fileUrl
;
}
public
void
setFileUrl
(
String
fileUrl
)
{
this
.
fileUrl
=
fileUrl
;
}
/**
* dialogsId
* 对话ID
...
...
src/main/java/cn/com/poc/agent_application/model/BizAgentApplicationDialoguesRecordModel.java
View file @
94f4a2e9
...
...
@@ -161,6 +161,21 @@ public class BizAgentApplicationDialoguesRecordModel extends BaseModelClass impl
this
.
imageUrl
=
imageUrl
;
}
/**
* file_url
* 文件地址
*/
private
java
.
lang
.
String
fileUrl
;
@Column
(
name
=
"file_url"
,
length
=
120
)
public
String
getFileUrl
()
{
return
fileUrl
;
}
public
void
setFileUrl
(
String
fileUrl
)
{
this
.
fileUrl
=
fileUrl
;
}
/**
* timestamp
* 时间戳
...
...
src/main/java/cn/com/poc/long_document/aggregate/LongTextDialoguesService.java
View file @
94f4a2e9
package
cn
.
com
.
poc
.
long_document
.
aggregate
;
import
cn.com.poc.long_document.dto.DialoguesContextDto
;
import
cn.com.poc.long_document.dto.LongTextDialoguesDto
;
import
cn.com.poc.long_document.dto.LongTextExampleDto
;
import
cn.com.poc.long_document.dto.LongTextSummaryDto
;
...
...
@@ -13,20 +11,11 @@ import java.util.List;
*/
public
interface
LongTextDialoguesService
{
String
create
(
String
fileUrl
,
Long
userId
)
throws
Exception
;
void
call
(
String
dialoguesId
,
String
fileUrl
,
String
input
,
Integer
[]
knowledgeIds
,
Long
userId
)
throws
Exception
;
LongTextSummaryDto
summary
(
String
dialoguesId
,
Long
userId
)
throws
Exception
;
void
delete
(
String
dialoguesId
,
Long
userId
)
throws
Exception
;
LongTextDialoguesDto
dialoguesDetail
(
String
dialoguesId
,
Long
userId
)
throws
Exception
;
List
<
LongTextDialoguesDto
>
dialoguesList
(
Long
userId
)
throws
Exception
;
List
<
DialoguesContextDto
>
dialoguesContext
(
String
dialoguesId
,
Long
userId
)
throws
Exception
;
List
<
LongTextExampleDto
>
example
()
throws
Exception
;
}
src/main/java/cn/com/poc/long_document/aggregate/impl/LongTextDialoguesServiceImpl.java
View file @
94f4a2e9
This diff is collapsed.
Click to expand it.
src/main/java/cn/com/poc/long_document/rest/LongTextDialoguesRest.java
View file @
94f4a2e9
package
cn
.
com
.
poc
.
long_document
.
rest
;
import
cn.com.poc.long_document.dto.*
;
import
cn.com.poc.long_document.dto.LongTextDialoguesCallDto
;
import
cn.com.poc.long_document.dto.LongTextExampleDto
;
import
cn.com.poc.long_document.dto.LongTextSummaryDto
;
import
cn.com.yict.framemax.core.rest.BaseRest
;
import
cn.com.yict.framemax.web.permission.Access
;
import
cn.com.yict.framemax.web.permission.Permission
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -20,14 +21,6 @@ import java.util.List;
public
interface
LongTextDialoguesRest
extends
BaseRest
{
/**
* 创建对话
*
* @return
* @throws Exception
*/
String
create
(
@RequestBody
CreateDialoguesDto
dto
)
throws
Exception
;
/**
* 核心观点提取、总结摘要
*/
...
...
@@ -42,48 +35,6 @@ public interface LongTextDialoguesRest extends BaseRest {
void
call
(
@RequestBody
LongTextDialoguesCallDto
dto
)
throws
Exception
;
/**
* 删除对话
*
* @param dialoguesId
* @throws Exception
*/
void
delete
(
@RequestParam
String
dialoguesId
)
throws
Exception
;
/**
* 批量删除对话
*
* @param dto
* @throws Exception
*/
void
batchDelete
(
@RequestBody
BatchDelDialoguesDto
dto
)
throws
Exception
;
/**
* 对话详情
*
* @param dialoguesId
* @return
*/
LongTextDialoguesDto
dialoguesDetail
(
@RequestParam
String
dialoguesId
)
throws
Exception
;
/**
* 对话列表
*
* @return
* @throws Exception
*/
List
<
LongTextDialoguesDto
>
dialoguesList
()
throws
Exception
;
/**
* 对话上下文
*
* @param dialoguesId
* @return
* @throws Exception
*/
List
<
DialoguesContextDto
>
dialoguesContext
(
@RequestParam
String
dialoguesId
)
throws
Exception
;
/**
* 示例
*
...
...
src/main/java/cn/com/poc/long_document/rest/impl/LongTextDialoguesRestImpl.java
View file @
94f4a2e9
...
...
@@ -4,12 +4,13 @@ package cn.com.poc.long_document.rest.impl;
import
cn.com.poc.common.utils.Assert
;
import
cn.com.poc.common.utils.BlContext
;
import
cn.com.poc.long_document.aggregate.LongTextDialoguesService
;
import
cn.com.poc.long_document.dto.*
;
import
cn.com.poc.long_document.dto.LongTextDialoguesCallDto
;
import
cn.com.poc.long_document.dto.LongTextExampleDto
;
import
cn.com.poc.long_document.dto.LongTextSummaryDto
;
import
cn.com.poc.long_document.rest.LongTextDialoguesRest
;
import
cn.com.poc.support.security.oauth.entity.UserBaseEntity
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
javax.annotation.Resource
;
import
java.util.List
;
...
...
@@ -25,16 +26,6 @@ public class LongTextDialoguesRestImpl implements LongTextDialoguesRest {
@Resource
private
LongTextDialoguesService
longTextDialoguesService
;
@Override
public
String
create
(
CreateDialoguesDto
dto
)
throws
Exception
{
Assert
.
notNull
(
dto
.
getFileUrl
(),
"文件URL不能为空"
);
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
if
(
userBaseEntity
==
null
)
{
throw
new
BusinessException
(
"用户未登录"
);
}
return
longTextDialoguesService
.
create
(
dto
.
getFileUrl
(),
userBaseEntity
.
getUserId
());
}
@Override
public
void
call
(
LongTextDialoguesCallDto
dto
)
throws
Exception
{
Assert
.
notBlank
(
dto
.
getDialoguesId
(),
"对话ID不能为空"
);
...
...
@@ -61,63 +52,6 @@ public class LongTextDialoguesRestImpl implements LongTextDialoguesRest {
return
longTextDialoguesService
.
summary
(
dialoguesId
,
userBaseEntity
.
getUserId
());
}
@Override
public
void
delete
(
String
dialoguesId
)
throws
Exception
{
Assert
.
notBlank
(
dialoguesId
,
"对话ID不能为空"
);
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
if
(
userBaseEntity
==
null
)
{
throw
new
BusinessException
(
"用户未登录"
);
}
longTextDialoguesService
.
delete
(
dialoguesId
,
userBaseEntity
.
getUserId
());
}
@Override
public
void
batchDelete
(
BatchDelDialoguesDto
dto
)
{
Assert
.
notNull
(
dto
,
"批量删除对话DTO不能为空"
);
Assert
.
notEmpty
(
dto
.
getDialoguesIds
(),
"对话ID列表不能为空"
);
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
if
(
userBaseEntity
==
null
)
{
throw
new
BusinessException
(
"用户未登录"
);
}
dto
.
getDialoguesIds
().
parallelStream
().
forEach
(
dialoguesId
->
{
try
{
longTextDialoguesService
.
delete
(
dialoguesId
,
userBaseEntity
.
getUserId
());
}
catch
(
Exception
e
)
{
throw
new
BusinessException
(
"----批量删除对话失败----"
,
e
);
}
});
}
@Override
public
LongTextDialoguesDto
dialoguesDetail
(
String
dialoguesId
)
throws
Exception
{
Assert
.
notBlank
(
dialoguesId
,
"对话ID不能为空"
);
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
if
(
userBaseEntity
==
null
)
{
throw
new
BusinessException
(
"用户未登录"
);
}
return
longTextDialoguesService
.
dialoguesDetail
(
dialoguesId
,
userBaseEntity
.
getUserId
());
}
@Override
public
List
<
LongTextDialoguesDto
>
dialoguesList
()
throws
Exception
{
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
if
(
userBaseEntity
==
null
)
{
throw
new
BusinessException
(
"用户未登录"
);
}
return
longTextDialoguesService
.
dialoguesList
(
userBaseEntity
.
getUserId
());
}
@Override
public
List
<
DialoguesContextDto
>
dialoguesContext
(
String
dialoguesId
)
throws
Exception
{
Assert
.
notBlank
(
dialoguesId
,
"对话ID不能为空"
);
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUserNotException
();
if
(
userBaseEntity
==
null
)
{
throw
new
BusinessException
(
"用户未登录"
);
}
return
longTextDialoguesService
.
dialoguesContext
(
dialoguesId
,
userBaseEntity
.
getUserId
());
}
@Override
public
List
<
LongTextExampleDto
>
example
()
throws
Exception
{
return
longTextDialoguesService
.
example
();
...
...
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