Commit 4c802a0d by huluobin

update

parent c7841f88
...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gogirl.application.product.mall.MallCategoryService; import com.gogirl.application.product.mall.MallCategoryService;
import com.gogirl.domain.product.mall.MallCategory; import com.gogirl.domain.product.mall.MallCategory;
import com.gogirl.infrastructure.common.util.ListUtil; import com.gogirl.infrastructure.common.util.ListUtil;
import com.gogirl.infrastructure.common.util.SerializationUtils;
import com.gogirl.infrastructure.mapper.order.mall.CategoryMapper; import com.gogirl.infrastructure.mapper.order.mall.CategoryMapper;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -39,12 +38,10 @@ public class MallCategoryServiceImpl extends ServiceImpl<CategoryMapper, MallCat ...@@ -39,12 +38,10 @@ public class MallCategoryServiceImpl extends ServiceImpl<CategoryMapper, MallCat
for (MallCategory mallCategory : list) { for (MallCategory mallCategory : list) {
if (mallCategory.getId().equals(subTreeId)) { if (mallCategory.getId().equals(subTreeId)) {
if (ListUtil.isNotEmpty(mallCategory.getChildList())) { if (ListUtil.isEmpty(mallCategory.getChildList())) {
List<MallCategory> clone = SerializationUtils.clone((new ArrayList<>(mallCategory.getChildList()))); return new ArrayList<>();
if (ListUtil.isNotEmpty(clone)) {
return clone;
}
} }
return mallCategory.getChildList();
} else if (ListUtil.isNotEmpty(mallCategory.getChildList())) { } else if (ListUtil.isNotEmpty(mallCategory.getChildList())) {
this.findSubTree(mallCategory.getChildList(), subTreeId); this.findSubTree(mallCategory.getChildList(), subTreeId);
} }
......
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