Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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
base_platform_enterprise
gic-store
Commits
2341841d
Commit
2341841d
authored
Mar 25, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加注释
parent
d9456d04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
StoreGroupApiServiceImpl.java
...ic/store/service/outer/impl/StoreGroupApiServiceImpl.java
+4
-0
No files found.
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreGroupApiServiceImpl.java
View file @
2341841d
...
...
@@ -99,6 +99,7 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
}
int
storeGroupId
=
storeGroupDTO
.
getStoreGroupId
();
TabStoreGroup
oldStoreGroup
;
//初始化的门店分组不允许编辑
ServiceResponse
<
TabStoreGroup
>
oldStoreGroupResponse
=
validIsDefault
(
storeGroupId
);
if
(
oldStoreGroupResponse
.
isSuccess
())
{
oldStoreGroup
=
oldStoreGroupResponse
.
getResult
();
...
...
@@ -112,12 +113,15 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"父级ID参数错误"
);
}
int
storeGroupParentId
=
storeGroupDTO
.
getParentStoreGroupId
();
//初始化的门店分组下面不允许有子分组
ServiceResponse
<
TabStoreGroup
>
authValid
=
validIsDefault
(
storeGroupParentId
);
if
(!
authValid
.
isSuccess
())
{
return
ServiceResponse
.
failure
(
authValid
.
getCode
(),
authValid
.
getMessage
());
}
//验证上级分组是改动
int
oldStoreGroupParentId
=
oldStoreGroup
.
getParentStoreGroupId
();
boolean
hasEditParentId
=
storeGroupParentId
!=
oldStoreGroupParentId
;
if
(
hasEditParentId
)
{
//验证父级ID的层级和当前层级是否相差一,如果是,则正确,否则,数据异常
TabStoreGroup
parentStoreGroup
=
storeGroupService
.
getStoreGroupById
(
storeGroupParentId
);
...
...
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