Commit c35cb08a by guojuxing

门店分组是否是叶子结点修改

parent 1b191062
......@@ -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:
......
......@@ -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;
......
......@@ -420,7 +420,7 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
* @return
*/
private boolean isNeedTransferStore(Integer parentStoreGroupId) {
if (storeGroupService.isLeafNode(parentStoreGroupId)
if (storeGroupService.isLeafNodeWhenNewStoreGroup(parentStoreGroupId)
&& isContainStore(parentStoreGroupId)) {
return true;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment