fix: 空数据时接口报错
This commit is contained in:
+10
-8
@@ -147,14 +147,16 @@ public class SarMenuStandard extends BaseEntity {
|
||||
this.fbStandCount = countMatches(fbStandMenu, this.id, fbStandIdList);
|
||||
this.esStandCount = countMatches(esStandMenu, this.id, esStandIdList);
|
||||
|
||||
for (SarMenuStandard child : children) {
|
||||
child.calculateAndSetCounts(gbStandMenu, fbStandMenu, esStandMenu, curLevel + 1);
|
||||
this.gbStandCount += child.gbStandCount;
|
||||
this.gbStandIdList.addAll(child.gbStandIdList);
|
||||
this.fbStandCount += child.fbStandCount;
|
||||
this.fbStandIdList.addAll(child.fbStandIdList);
|
||||
this.esStandCount += child.esStandCount;
|
||||
this.esStandIdList.addAll(child.esStandIdList);
|
||||
if (children != null && !children.isEmpty()) {
|
||||
for (SarMenuStandard child : children) {
|
||||
child.calculateAndSetCounts(gbStandMenu, fbStandMenu, esStandMenu, curLevel + 1);
|
||||
this.gbStandCount += child.gbStandCount;
|
||||
this.gbStandIdList.addAll(child.gbStandIdList);
|
||||
this.fbStandCount += child.fbStandCount;
|
||||
this.fbStandIdList.addAll(child.fbStandIdList);
|
||||
this.esStandCount += child.esStandCount;
|
||||
this.esStandIdList.addAll(child.esStandIdList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user