Commit a1f8cdaa by zhiwj

门店分组叶子节点判断

parent deebc5a9
......@@ -542,12 +542,17 @@ public class StoreApiServiceImpl implements StoreApiService {
} else {
// 判断分组是否存在
TabStoreGroup group = storeGroupService.getStoreGroupById(storeDTO.getStoreGroupId());
if (group != null) {
storeDTO.setStoreGroupId(group.getStoreGroupId());
} else {
if (group == null) {
logger.info("enterpriseId:{}, groupName:{}, 不存在该分组", storeDTO.getEnterpriseId(), storeDTO.getStoreGroupName());
return "门店分组不存在";
}
if (storeGroupService.isLeafNode(group.getStoreGroupId())) {
// 如果是叶子节点
storeDTO.setStoreGroupId(group.getStoreGroupId());
} else {
logger.info("enterpriseId:{}, groupName:{}, groupId:{}, 分组不是叶子节点", storeDTO.getEnterpriseId(), storeDTO.getStoreGroupName(), group.getStoreGroupId());
return "分组不是叶子节点";
}
}
} 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