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
6c72fa18
Commit
6c72fa18
authored
Jun 19, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(LongTextDialogues):新增批量删除对话接口
parent
d46339dc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
4 deletions
+47
-4
LongTextDialoguesServiceImpl.java
...document/aggregate/impl/LongTextDialoguesServiceImpl.java
+0
-2
BatchDelDialoguesDto.java
...va/cn/com/poc/long_document/dto/BatchDelDialoguesDto.java
+20
-0
LongTextDialoguesRest.java
.../cn/com/poc/long_document/rest/LongTextDialoguesRest.java
+9
-2
LongTextDialoguesRestImpl.java
...oc/long_document/rest/impl/LongTextDialoguesRestImpl.java
+18
-0
No files found.
src/main/java/cn/com/poc/long_document/aggregate/impl/LongTextDialoguesServiceImpl.java
View file @
6c72fa18
...
...
@@ -38,11 +38,9 @@ import cn.com.poc.thirdparty.resource.demand.ai.entity.largemodel.LargeModelDema
import
cn.com.poc.thirdparty.resource.demand.ai.entity.largemodel.LargeModelResponse
;
import
cn.com.poc.thirdparty.service.LLMService
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
cn.com.yict.framemax.core.i18n.I18nMessageException
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.crypto.digest.MD5
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
src/main/java/cn/com/poc/long_document/dto/BatchDelDialoguesDto.java
0 → 100644
View file @
6c72fa18
package
cn
.
com
.
poc
.
long_document
.
dto
;
import
java.util.List
;
/**
* @author alex.yao
* @date 2025/6/19
*/
public
class
BatchDelDialoguesDto
{
private
List
<
String
>
dialoguesIds
;
public
List
<
String
>
getDialoguesIds
()
{
return
dialoguesIds
;
}
public
void
setDialoguesIds
(
List
<
String
>
dialoguesIds
)
{
this
.
dialoguesIds
=
dialoguesIds
;
}
}
src/main/java/cn/com/poc/long_document/rest/LongTextDialoguesRest.java
View file @
6c72fa18
...
...
@@ -29,8 +29,7 @@ public interface LongTextDialoguesRest extends BaseRest {
String
create
(
@RequestBody
CreateDialoguesDto
dto
)
throws
Exception
;
/**
*核心观点提取、总结摘要
*
* 核心观点提取、总结摘要
*/
LongTextSummaryDto
summary
(
@RequestParam
String
dialoguesId
)
throws
Exception
;
...
...
@@ -51,6 +50,14 @@ public interface LongTextDialoguesRest extends BaseRest {
*/
void
delete
(
@RequestParam
String
dialoguesId
)
throws
Exception
;
/**
* 批量删除对话
*
* @param dto
* @throws Exception
*/
void
batchDelete
(
@RequestBody
BatchDelDialoguesDto
dto
)
throws
Exception
;
/**
* 对话详情
*
...
...
src/main/java/cn/com/poc/long_document/rest/impl/LongTextDialoguesRestImpl.java
View file @
6c72fa18
...
...
@@ -9,6 +9,7 @@ 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
;
...
...
@@ -71,6 +72,23 @@ public class LongTextDialoguesRestImpl implements LongTextDialoguesRest {
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不能为空"
);
...
...
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