Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
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
liyuan
byit-myth-job
Commits
59fd0992
Commit
59fd0992
authored
Mar 16, 2020
by
guominglei@byitgroup.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校验工作空间是否存在
parent
39ae1e3f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
ApiWorkspaceController.java
...in/src/main/java/com/byit/api/ApiWorkspaceController.java
+6
-0
ApiWorkspaceService.java
...n/src/main/java/com/byit/service/ApiWorkspaceService.java
+7
-0
ApiWorkspaceServiceImpl.java
...n/java/com/byit/service/impl/ApiWorkspaceServiceImpl.java
+10
-0
No files found.
byit-myth-admin/src/main/java/com/byit/api/ApiWorkspaceController.java
View file @
59fd0992
...
...
@@ -28,4 +28,10 @@ public class ApiWorkspaceController {
workspaceService
.
add
(
workspaceName
);
return
"SUCCESS"
;
}
@PostMapping
(
"exist"
)
@ApiOperation
(
"是否存在"
)
public
Boolean
exist
(
String
workspaceName
){
return
workspaceService
.
exist
(
workspaceName
);
}
}
byit-myth-admin/src/main/java/com/byit/service/ApiWorkspaceService.java
View file @
59fd0992
...
...
@@ -7,4 +7,11 @@ package com.byit.service;
*/
public
interface
ApiWorkspaceService
{
void
add
(
String
workspaceName
);
/**
* 判断工作空间是否存在
* @param workspaceName
* @return
*/
Boolean
exist
(
String
workspaceName
);
}
byit-myth-admin/src/main/java/com/byit/service/impl/ApiWorkspaceServiceImpl.java
View file @
59fd0992
...
...
@@ -32,4 +32,14 @@ public class ApiWorkspaceServiceImpl implements ApiWorkspaceService {
workspace
.
setAddTime
(
new
Date
());
workspaceMapper
.
insertSelective
(
workspace
);
}
@Override
public
Boolean
exist
(
String
workspaceName
)
{
ValidationUtil
.
dataNotBank
(
workspaceName
,
"工作空间名称不允许为空!"
);
Workspace
workspace
=
workspaceMapper
.
getByName
(
workspaceName
);
if
(
null
==
workspace
){
return
true
;
}
return
false
;
}
}
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