Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huang.tao
/
jmai-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4a2d7d1c
authored
Sep 11, 2025
by
huangtao
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
sys_user
parent
b3fcf88d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletions
jmai-sys/src/main/java/com/jmai/sys/dto/OrganizationDto.java
jmai-sys/src/main/java/com/jmai/sys/service/impl/OrganizationServiceImpl.java
jmai-sys/src/main/java/com/jmai/sys/dto/OrganizationDto.java
View file @
4a2d7d1c
...
...
@@ -12,6 +12,12 @@ public class OrganizationDto {
@ApiModelProperty
(
value
=
"组织名称"
)
private
String
organizationName
;
@ApiModelProperty
(
value
=
"层级"
)
private
Integer
level
;
@ApiModelProperty
(
value
=
"父级ID"
)
private
Long
parentId
;
@ApiModelProperty
(
value
=
"描述"
)
private
String
remark
;
...
...
jmai-sys/src/main/java/com/jmai/sys/service/impl/OrganizationServiceImpl.java
View file @
4a2d7d1c
...
...
@@ -70,8 +70,15 @@ public class OrganizationServiceImpl extends AbstractService implements Organiza
if
(
existed
.
isPresent
())
{
throw
new
ServiceException
(
ORGANIZATION_NAME_EXISTED
,
":仓库名称="
+
req
.
getOrganizationName
());
}
SysOrganization
organization
=
copyTo
(
req
,
new
SysOrganization
());
if
(
ObjectUtil
.
isNotEmpty
(
req
.
getParentId
())){
OrganizationDto
organizationOrThrow
=
getOrganizationOrThrow
(
req
.
getParentId
());
Integer
level
=
organizationOrThrow
.
getLevel
();
organization
.
setLevel
(
level
+
1
);
}
sysOrganizationMapper
.
insert
(
organization
);
return
convertTo
(
organization
);
...
...
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