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
830dd6bc
Commit
830dd6bc
authored
Apr 11, 2024
by
pengxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发布后才写入到json文件中。
parent
a6c3090d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
DatasetVersionController.java
...ice/webadmin/app/controller/DatasetVersionController.java
+2
-2
DatasetVersionService.java
.../com/yice/webadmin/app/service/DatasetVersionService.java
+7
-0
DatasetVersionServiceImpl.java
.../webadmin/app/service/impl/DatasetVersionServiceImpl.java
+2
-1
No files found.
application-webadmin/src/main/java/com/yice/webadmin/app/controller/DatasetVersionController.java
View file @
830dd6bc
...
...
@@ -122,7 +122,7 @@ public class DatasetVersionController {
*/
@OperationLog
(
type
=
SysOperationLogType
.
UPDATE
)
@GetMapping
(
"/publish"
)
public
ResponseResult
<
Void
>
publish
(
@RequestParam
(
"versionId"
)
Long
versionId
)
{
public
ResponseResult
<
Void
>
publish
(
@RequestParam
(
"versionId"
)
Long
versionId
)
throws
IOException
{
String
errorMessage
;
if
(
null
==
versionId
)
{
errorMessage
=
"数据验证失败,参数不能为空!"
;
...
...
@@ -142,7 +142,7 @@ public class DatasetVersionController {
return
ResponseResult
.
error
(
ErrorCodeEnum
.
DATA_NOT_EXIST
,
errorMessage
);
}
datasetVersion
.
setReleaseStatus
(
DatasetConstant
.
STATUS_PUBLISHED
);
if
(!
datasetVersionService
.
update
(
datasetVersion
))
{
if
(!
datasetVersionService
.
saveDatasetJsonPath
(
datasetVersion
))
{
return
ResponseResult
.
error
(
ErrorCodeEnum
.
DATA_NOT_EXIST
);
}
return
ResponseResult
.
success
();
...
...
application-webadmin/src/main/java/com/yice/webadmin/app/service/DatasetVersionService.java
View file @
830dd6bc
...
...
@@ -30,6 +30,13 @@ public interface DatasetVersionService extends IBaseService<DatasetVersion, Long
*/
void
saveNewBatch
(
List
<
DatasetVersion
>
datasetVersionList
);
/**
* 写入json格式路径
* @param datasetVersion
* @throws IOException 异常
*/
boolean
saveDatasetJsonPath
(
DatasetVersion
datasetVersion
)
throws
IOException
;
/**
* 存储到python数据集中并进行更新操作
* @param versionName
...
...
application-webadmin/src/main/java/com/yice/webadmin/app/service/impl/DatasetVersionServiceImpl.java
View file @
830dd6bc
...
...
@@ -315,7 +315,8 @@ public class DatasetVersionServiceImpl extends BaseService<DatasetVersion, Long>
* @param datasetVersion
* @throws IOException 异常
*/
public
boolean
saveDatasetJsonPath
(
DatasetVersion
datasetVersion
)
throws
IOException
{
@Override
public
boolean
saveDatasetJsonPath
(
DatasetVersion
datasetVersion
)
throws
IOException
{
//导入时不需要写入到json文件中
String
versionName
=
datasetVersion
.
getVersionName
();
//先存储文件
...
...
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