code review:会员统计

This commit is contained in:
YunaiV
2023-10-14 01:26:06 +08:00
parent 0eb86ca269
commit 1ac2f2b5c2
24 changed files with 86 additions and 41 deletions

View File

@ -145,18 +145,15 @@ public class AreaUtils {
if (area == null) {
return null;
}
// 匹配到
// 情况一:匹配到,返回它
if (type.getType().equals(area.getType())) {
return area.getId();
}
// 找到根节点,返回空
// 情况二:找到根节点,返回空
if (area.getParent() == null || area.getParent().getId() == null) {
return null;
}
// 继续向上查找
// 其它:继续向上查找
id = area.getParent().getId();
}
return null;