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
b207b14e
Commit
b207b14e
authored
Sep 23, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/base_platform_enterprise/gic-store
into developer
parents
83245949
5cec8bed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
+37
-2
StoreGroupService.java
...rc/main/java/com/gic/store/service/StoreGroupService.java
+10
-0
StoreGroupServiceImpl.java
...ava/com/gic/store/service/impl/StoreGroupServiceImpl.java
+12
-1
StoreGroupApiServiceImpl.java
...ic/store/service/outer/impl/StoreGroupApiServiceImpl.java
+15
-1
No files found.
gic-store-service/src/main/java/com/gic/store/service/StoreGroupService.java
View file @
b207b14e
...
...
@@ -188,6 +188,16 @@ public interface StoreGroupService {
boolean
isLeafNode
(
Integer
storeGroupId
);
/**
* 是否是叶子节点
* @Title: isLeafNodeWhenNewStoreGroup
* @Description:
* @author guojuxing
* @param storeGroupId
* @return boolean
*/
boolean
isLeafNodeWhenNewStoreGroup
(
Integer
storeGroupId
);
/**
* 查询所有门店分组
* @Title: selectAllStoreGroup
* @Description:
...
...
gic-store-service/src/main/java/com/gic/store/service/impl/StoreGroupServiceImpl.java
View file @
b207b14e
...
...
@@ -147,7 +147,18 @@ public class StoreGroupServiceImpl implements StoreGroupService{
@Override
public
boolean
isLeafNode
(
Integer
storeGroupId
)
{
int
count
=
tabStoreGroupMapper
.
countByParentId
(
storeGroupId
);
if
(
count
>
1
)
{
//新节点已经创建,所以应该大于1
if
(
count
>
0
)
{
return
false
;
}
else
{
return
true
;
}
}
@Override
public
boolean
isLeafNodeWhenNewStoreGroup
(
Integer
storeGroupId
)
{
int
count
=
tabStoreGroupMapper
.
countByParentId
(
storeGroupId
);
//新节点已经创建,所以应该大于1
if
(
count
>
1
)
{
return
false
;
}
else
{
return
true
;
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreGroupApiServiceImpl.java
View file @
b207b14e
...
...
@@ -77,7 +77,7 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
storeGroupChain
.
setStoreGroupId
(
storeGroupId
);
storeGroupChain
.
setStoreGroupChain
(
getStoreGroupChain
(
storeGroupId
));
storeGroupService
.
update
(
storeGroupChain
);
boolean
needTransferStore
=
isNeedTransferStore
(
storeGroupDTO
.
getParentStoreGroupId
());
boolean
needTransferStore
=
isNeedTransferStore
WhenNew
(
storeGroupDTO
.
getParentStoreGroupId
());
logger
.
info
(
"needTransferStore:{}"
,
needTransferStore
);
if
(
needTransferStore
)
{
//转移门店
...
...
@@ -419,6 +419,20 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
* @param parentStoreGroupId
* @return
*/
private
boolean
isNeedTransferStoreWhenNew
(
Integer
parentStoreGroupId
)
{
if
(
storeGroupService
.
isLeafNodeWhenNewStoreGroup
(
parentStoreGroupId
)
&&
isContainStore
(
parentStoreGroupId
))
{
return
true
;
}
else
{
return
false
;
}
}
/**
* 是否需要转移门店 判断上级门店是否是子节点,并且是否有门店
* @param parentStoreGroupId
* @return
*/
private
boolean
isNeedTransferStore
(
Integer
parentStoreGroupId
)
{
if
(
storeGroupService
.
isLeafNode
(
parentStoreGroupId
)
&&
isContainStore
(
parentStoreGroupId
))
{
...
...
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