Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lmp_server
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
lmp
lmp_server
Commits
5a8c60af
Commit
5a8c60af
authored
Dec 18, 2023
by
pengxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除文档集合接口优化处理。
parent
04ba9957
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
DatasetDataService.java
...ava/com/yice/webadmin/app/service/DatasetDataService.java
+2
-2
DatasetDataServiceImpl.java
...ice/webadmin/app/service/impl/DatasetDataServiceImpl.java
+3
-5
No files found.
application-webadmin/src/main/java/com/yice/webadmin/app/service/DatasetDataService.java
View file @
5a8c60af
...
@@ -22,12 +22,12 @@ public interface DatasetDataService {
...
@@ -22,12 +22,12 @@ public interface DatasetDataService {
void
save
(
DatasetData
datasetData
);
void
save
(
DatasetData
datasetData
);
/**
/**
* 删除
该数据集
。
* 删除
整个集合中的文档数据
。
*
*
* @param versionId 版本标识。
* @param versionId 版本标识。
* @return 返回受影响的行数。
* @return 返回受影响的行数。
*/
*/
Long
delete
(
Long
versionId
);
void
delete
(
Long
versionId
);
/**
/**
* 根据id查询该条信息。
* 根据id查询该条信息。
...
...
application-webadmin/src/main/java/com/yice/webadmin/app/service/impl/DatasetDataServiceImpl.java
View file @
5a8c60af
...
@@ -116,14 +116,12 @@ public class DatasetDataServiceImpl implements DatasetDataService {
...
@@ -116,14 +116,12 @@ public class DatasetDataServiceImpl implements DatasetDataService {
}
}
/**
/**
* 删除
该数据集
。
* 删除
整个集合中的文档数据
。
*
*
* @param versionId 版本标识。
* @param versionId 版本标识。
* @return 返回受影响的行数。
* @return 返回受影响的行数。
*/
*/
public
Long
delete
(
Long
versionId
)
{
public
void
delete
(
Long
versionId
)
{
Query
query
=
new
Query
(
Criteria
.
where
(
MongoConstant
.
VERSION
).
is
(
versionId
));
mongoTemplate
.
dropCollection
(
MongoConstant
.
COLLECT_NAME
+
versionId
);
return
mongoTemplate
.
remove
(
query
,
DatasetData
.
class
,
MongoConstant
.
COLLECT_NAME
+
versionId
).
getDeletedCount
();
}
}
}
}
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