|
@@ -7,6 +7,7 @@ import com.slodon.b2b2c.core.constant.RedisConst;
|
|
import com.slodon.b2b2c.core.constant.StoreConst;
|
|
import com.slodon.b2b2c.core.constant.StoreConst;
|
|
import com.slodon.b2b2c.core.response.JsonResult;
|
|
import com.slodon.b2b2c.core.response.JsonResult;
|
|
import com.slodon.b2b2c.core.response.SldResponse;
|
|
import com.slodon.b2b2c.core.response.SldResponse;
|
|
|
|
+import com.slodon.b2b2c.core.util.FileUrlUtil;
|
|
import com.slodon.b2b2c.core.util.StringUtil;
|
|
import com.slodon.b2b2c.core.util.StringUtil;
|
|
import com.slodon.b2b2c.core.util.UserUtil;
|
|
import com.slodon.b2b2c.core.util.UserUtil;
|
|
import com.slodon.b2b2c.goods.example.GoodsCategoryExample;
|
|
import com.slodon.b2b2c.goods.example.GoodsCategoryExample;
|
|
@@ -265,14 +266,14 @@ public class GoodsCategorySellerController {
|
|
@ApiImplicitParam(name = "categoryId1", value = "一级分类Id", required = true)
|
|
@ApiImplicitParam(name = "categoryId1", value = "一级分类Id", required = true)
|
|
})
|
|
})
|
|
@GetMapping("bottomCategory")
|
|
@GetMapping("bottomCategory")
|
|
- public JsonResult<List<FrontGoodsCategoryVO>> bottomCategory(HttpServletRequest request, Integer categoryId1) {
|
|
|
|
|
|
+ public JsonResult<List<FrontGoodsCategoryVO>> bottomCategory(HttpServletRequest request, Integer categoryId1,String webSite) {
|
|
Vendor vendor = UserUtil.getUser(request, Vendor.class);
|
|
Vendor vendor = UserUtil.getUser(request, Vendor.class);
|
|
|
|
|
|
List<FrontGoodsCategoryVO> vos = new ArrayList<>();
|
|
List<FrontGoodsCategoryVO> vos = new ArrayList<>();
|
|
//根据店铺类型获取分类
|
|
//根据店铺类型获取分类
|
|
if (vendor.getStore().getIsOwnStore().equals(StoreConst.IS_OWN_STORE)) {
|
|
if (vendor.getStore().getIsOwnStore().equals(StoreConst.IS_OWN_STORE)) {
|
|
//查询redis缓存
|
|
//查询redis缓存
|
|
- String dataJson = stringRedisTemplate.opsForValue().get(RedisConst.FRONT_GOODS_CATEGORY);
|
|
|
|
|
|
+ String dataJson = stringRedisTemplate.opsForValue().get(RedisConst.FRONT_GOODS_CATEGORY + "_" + webSite);
|
|
if (!StringUtils.isEmpty(dataJson)) {
|
|
if (!StringUtils.isEmpty(dataJson)) {
|
|
JSONArray jsonArray = JSONArray.parseArray(dataJson);
|
|
JSONArray jsonArray = JSONArray.parseArray(dataJson);
|
|
for (int i = 0; i < jsonArray.size(); i++) {
|
|
for (int i = 0; i < jsonArray.size(); i++) {
|
|
@@ -284,6 +285,7 @@ public class GoodsCategorySellerController {
|
|
for (int j = 0; j < array2.size(); j++) {
|
|
for (int j = 0; j < array2.size(); j++) {
|
|
JSONObject object = array2.getJSONObject(j);
|
|
JSONObject object = array2.getJSONObject(j);
|
|
FrontGoodsCategoryVO categoryVO = new FrontGoodsCategoryVO();
|
|
FrontGoodsCategoryVO categoryVO = new FrontGoodsCategoryVO();
|
|
|
|
+ categoryVO.setWebSite(object.getString("webSite"));
|
|
categoryVO.setCategoryId(object.getInteger("categoryId"));
|
|
categoryVO.setCategoryId(object.getInteger("categoryId"));
|
|
categoryVO.setCategoryName(object.getString("categoryName"));
|
|
categoryVO.setCategoryName(object.getString("categoryName"));
|
|
categoryVO.setPid(object.getInteger("pid"));
|
|
categoryVO.setPid(object.getInteger("pid"));
|
|
@@ -294,6 +296,7 @@ public class GoodsCategorySellerController {
|
|
for (int k = 0; k < array3.size(); k++) {
|
|
for (int k = 0; k < array3.size(); k++) {
|
|
JSONObject jsonObject2 = array3.getJSONObject(k);
|
|
JSONObject jsonObject2 = array3.getJSONObject(k);
|
|
FrontGoodsCategoryVO goodsCategoryVO = new FrontGoodsCategoryVO();
|
|
FrontGoodsCategoryVO goodsCategoryVO = new FrontGoodsCategoryVO();
|
|
|
|
+ goodsCategoryVO.setWebSite(jsonObject2.getString("webSite"));
|
|
goodsCategoryVO.setCategoryId(jsonObject2.getInteger("categoryId"));
|
|
goodsCategoryVO.setCategoryId(jsonObject2.getInteger("categoryId"));
|
|
goodsCategoryVO.setCategoryName(jsonObject2.getString("categoryName"));
|
|
goodsCategoryVO.setCategoryName(jsonObject2.getString("categoryName"));
|
|
goodsCategoryVO.setPid(jsonObject2.getInteger("pid"));
|
|
goodsCategoryVO.setPid(jsonObject2.getInteger("pid"));
|
|
@@ -314,6 +317,7 @@ public class GoodsCategorySellerController {
|
|
StoreBindCategoryExample example = new StoreBindCategoryExample();
|
|
StoreBindCategoryExample example = new StoreBindCategoryExample();
|
|
example.setStoreId(vendor.getStoreId());
|
|
example.setStoreId(vendor.getStoreId());
|
|
example.setGoodsCategoryId1(categoryId1);
|
|
example.setGoodsCategoryId1(categoryId1);
|
|
|
|
+ example.setWebSite(webSite);
|
|
example.setState(StoreConst.STORE_CATEGORY_STATE_PASS);
|
|
example.setState(StoreConst.STORE_CATEGORY_STATE_PASS);
|
|
List<StoreBindCategory> list = storeBindCategoryModel.getStoreBindCategoryList(example, null);
|
|
List<StoreBindCategory> list = storeBindCategoryModel.getStoreBindCategoryList(example, null);
|
|
//key-二级分类id, value-二级分类名称
|
|
//key-二级分类id, value-二级分类名称
|
|
@@ -339,6 +343,7 @@ public class GoodsCategorySellerController {
|
|
thirdList.forEach(goodsCategory -> {
|
|
thirdList.forEach(goodsCategory -> {
|
|
if (secondMap.containsKey(goodsCategory.getPid())) {
|
|
if (secondMap.containsKey(goodsCategory.getPid())) {
|
|
FrontGoodsCategoryVO categoryVO = new FrontGoodsCategoryVO();
|
|
FrontGoodsCategoryVO categoryVO = new FrontGoodsCategoryVO();
|
|
|
|
+ categoryVO.setWebSite(webSite);
|
|
categoryVO.setCategoryId(goodsCategory.getCategoryId());
|
|
categoryVO.setCategoryId(goodsCategory.getCategoryId());
|
|
categoryVO.setCategoryName(goodsCategory.getCategoryName());
|
|
categoryVO.setCategoryName(goodsCategory.getCategoryName());
|
|
categoryVO.setPid(goodsCategory.getCategoryId());
|
|
categoryVO.setPid(goodsCategory.getCategoryId());
|
|
@@ -347,6 +352,7 @@ public class GoodsCategorySellerController {
|
|
} else {
|
|
} else {
|
|
List<FrontGoodsCategoryVO> thirdVos = new ArrayList<>();
|
|
List<FrontGoodsCategoryVO> thirdVos = new ArrayList<>();
|
|
FrontGoodsCategoryVO categoryVO = new FrontGoodsCategoryVO();
|
|
FrontGoodsCategoryVO categoryVO = new FrontGoodsCategoryVO();
|
|
|
|
+ categoryVO.setWebSite(webSite);
|
|
categoryVO.setCategoryId(goodsCategory.getCategoryId());
|
|
categoryVO.setCategoryId(goodsCategory.getCategoryId());
|
|
categoryVO.setCategoryName(goodsCategory.getCategoryName());
|
|
categoryVO.setCategoryName(goodsCategory.getCategoryName());
|
|
categoryVO.setPid(goodsCategory.getCategoryId());
|
|
categoryVO.setPid(goodsCategory.getCategoryId());
|
|
@@ -368,4 +374,247 @@ public class GoodsCategorySellerController {
|
|
}
|
|
}
|
|
return SldResponse.success(vos);
|
|
return SldResponse.success(vos);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @ApiOperation("获取分类列表接口")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name = "webSite", value = "站点", paramType = "query")
|
|
|
|
+ })
|
|
|
|
+ @GetMapping("getStoreCateList")
|
|
|
|
+ public JsonResult<List<FrontGoodsCategoryVO>> getStoreCateList(HttpServletRequest request, @RequestParam(value = "webSite", required = false, defaultValue = "1") String webSite) {
|
|
|
|
+ Vendor vendor = UserUtil.getUser(request, Vendor.class);
|
|
|
|
+
|
|
|
|
+ List<FrontGoodsCategoryVO> vos = new ArrayList<>();
|
|
|
|
+ if (vendor.getStore().getIsOwnStore().equals(StoreConst.IS_OWN_STORE)) {
|
|
|
|
+ //一级分类信息
|
|
|
|
+ GoodsCategoryExample example = new GoodsCategoryExample();
|
|
|
|
+ example.setPid(0);
|
|
|
|
+ example.setWebSite(webSite);
|
|
|
|
+ example.setState(GoodsCategoryConst.CATEGORY_STATE_1);
|
|
|
|
+ example.setOrderBy("sort asc, create_time desc");
|
|
|
|
+ List<GoodsCategory> list = goodsCategoryModel.getGoodsCategoryList(example, null);
|
|
|
|
+ //全部分类信息
|
|
|
|
+ if (!CollectionUtils.isEmpty(list)) {
|
|
|
|
+ // 将所有一级分类ID转换为逗号分隔的字符串
|
|
|
|
+ StringBuilder firstLevelIdsBuilder = new StringBuilder();
|
|
|
|
+ for (GoodsCategory goodsCategory : list) {
|
|
|
|
+ if (firstLevelIdsBuilder.length() > 0) {
|
|
|
|
+ firstLevelIdsBuilder.append(",");
|
|
|
|
+ }
|
|
|
|
+ firstLevelIdsBuilder.append(goodsCategory.getCategoryId());
|
|
|
|
+ }
|
|
|
|
+ String firstLevelIds = firstLevelIdsBuilder.toString();
|
|
|
|
+
|
|
|
|
+ if (!firstLevelIds.isEmpty()) {
|
|
|
|
+ GoodsCategoryExample example2 = new GoodsCategoryExample();
|
|
|
|
+ example2.setPidIn(firstLevelIds);
|
|
|
|
+ example2.setState(GoodsCategoryConst.CATEGORY_STATE_1);
|
|
|
|
+ example2.setOrderBy("sort asc, create_time desc");
|
|
|
|
+ List<GoodsCategory> secondLevelList = goodsCategoryModel.getGoodsCategoryList(example2, null);
|
|
|
|
+
|
|
|
|
+ // 按照一级分类ID分组二级分类
|
|
|
|
+ Map<Integer, List<GoodsCategory>> secondLevelMap = new HashMap<>();
|
|
|
|
+ for (GoodsCategory secondCategory : secondLevelList) {
|
|
|
|
+ if (!secondLevelMap.containsKey(secondCategory.getPid())) {
|
|
|
|
+ secondLevelMap.put(secondCategory.getPid(), new ArrayList<>());
|
|
|
|
+ }
|
|
|
|
+ secondLevelMap.get(secondCategory.getPid()).add(secondCategory);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 获取所有三级分类IDs
|
|
|
|
+ StringBuilder secondLevelIdsBuilder = new StringBuilder();
|
|
|
|
+ for (GoodsCategory secondCategory : secondLevelList) {
|
|
|
|
+ if (secondLevelIdsBuilder.length() > 0) {
|
|
|
|
+ secondLevelIdsBuilder.append(",");
|
|
|
|
+ }
|
|
|
|
+ secondLevelIdsBuilder.append(secondCategory.getCategoryId());
|
|
|
|
+ }
|
|
|
|
+ String secondLevelIds = secondLevelIdsBuilder.toString();
|
|
|
|
+
|
|
|
|
+ if (!secondLevelIds.isEmpty()) {
|
|
|
|
+ GoodsCategoryExample example3 = new GoodsCategoryExample();
|
|
|
|
+ example3.setPidIn(secondLevelIds);
|
|
|
|
+ example3.setState(GoodsCategoryConst.CATEGORY_STATE_1);
|
|
|
|
+ example3.setOrderBy("sort asc, create_time desc");
|
|
|
|
+ List<GoodsCategory> thirdLevelList = goodsCategoryModel.getGoodsCategoryList(example3, null);
|
|
|
|
+
|
|
|
|
+ // 按照二级分类ID分组三级分类
|
|
|
|
+ Map<Integer, List<GoodsCategory>> thirdLevelMap = new HashMap<>();
|
|
|
|
+ for (GoodsCategory thirdCategory : thirdLevelList) {
|
|
|
|
+ if (!thirdLevelMap.containsKey(thirdCategory.getPid())) {
|
|
|
|
+ thirdLevelMap.put(thirdCategory.getPid(), new ArrayList<>());
|
|
|
|
+ }
|
|
|
|
+ thirdLevelMap.get(thirdCategory.getPid()).add(thirdCategory);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 构建完整的分类树
|
|
|
|
+ for (GoodsCategory firstCategory : list) {
|
|
|
|
+ FrontGoodsCategoryVO firstVO = new FrontGoodsCategoryVO(firstCategory);
|
|
|
|
+ List<FrontGoodsCategoryVO> secondVOs = new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ List<GoodsCategory> secondCategories = secondLevelMap.get(firstCategory.getCategoryId());
|
|
|
|
+ if (!CollectionUtils.isEmpty(secondCategories)) {
|
|
|
|
+ for (GoodsCategory secondCategory : secondCategories) {
|
|
|
|
+ FrontGoodsCategoryVO secondVO = new FrontGoodsCategoryVO(secondCategory);
|
|
|
|
+ // 没有图片就用默认图片
|
|
|
|
+ if (StringUtils.isEmpty(secondCategory.getCategoryImage())) {
|
|
|
|
+ secondVO.setCategoryImage(FileUrlUtil.getFileUrl(stringRedisTemplate.opsForValue().get("default_goods_cate_grade2_image"), null));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<FrontGoodsCategoryVO> thirdVOs = new ArrayList<>();
|
|
|
|
+ List<GoodsCategory> thirdCategories = thirdLevelMap.get(secondCategory.getCategoryId());
|
|
|
|
+ if (!CollectionUtils.isEmpty(thirdCategories)) {
|
|
|
|
+ for (GoodsCategory thirdCategory : thirdCategories) {
|
|
|
|
+ FrontGoodsCategoryVO thirdVO = new FrontGoodsCategoryVO(thirdCategory);
|
|
|
|
+ // 没有图片就用默认图片
|
|
|
|
+ if (StringUtils.isEmpty(thirdCategory.getCategoryImage())) {
|
|
|
|
+ thirdVO.setCategoryImage(FileUrlUtil.getFileUrl(stringRedisTemplate.opsForValue().get("default_goods_cate_grade3_image"), null));
|
|
|
|
+ }
|
|
|
|
+ thirdVOs.add(thirdVO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!CollectionUtils.isEmpty(thirdVOs)) {
|
|
|
|
+ secondVO.setChildren(thirdVOs);
|
|
|
|
+ secondVOs.add(secondVO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!CollectionUtils.isEmpty(secondVOs)) {
|
|
|
|
+ firstVO.setChildren(secondVOs);
|
|
|
|
+ vos.add(firstVO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ //入驻店铺,获取审核通过的分类
|
|
|
|
+ StoreBindCategoryExample example = new StoreBindCategoryExample();
|
|
|
|
+ example.setStoreId(vendor.getStoreId());
|
|
|
|
+ example.setWebSite(webSite);
|
|
|
|
+ example.setState(StoreConst.STORE_CATEGORY_STATE_PASS);
|
|
|
|
+ List<StoreBindCategory> list = storeBindCategoryModel.getStoreBindCategoryList(example, null);
|
|
|
|
+
|
|
|
|
+ if (!CollectionUtils.isEmpty(list)) {
|
|
|
|
+ // 提取所有一级分类ID并转换为逗号分隔的字符串
|
|
|
|
+ Set<Integer> firstLevelIdSet = new HashSet<>();
|
|
|
|
+ for (StoreBindCategory bindCategory : list) {
|
|
|
|
+ firstLevelIdSet.add(bindCategory.getGoodsCategoryId1());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ StringBuilder firstLevelIdsBuilder = new StringBuilder();
|
|
|
|
+ for (Integer id : firstLevelIdSet) {
|
|
|
|
+ if (firstLevelIdsBuilder.length() > 0) {
|
|
|
|
+ firstLevelIdsBuilder.append(",");
|
|
|
|
+ }
|
|
|
|
+ firstLevelIdsBuilder.append(id);
|
|
|
|
+ }
|
|
|
|
+ String firstLevelIds = firstLevelIdsBuilder.toString();
|
|
|
|
+
|
|
|
|
+ if (!firstLevelIds.isEmpty()) {
|
|
|
|
+ // 批量查询一级分类
|
|
|
|
+ GoodsCategoryExample firstExample = new GoodsCategoryExample();
|
|
|
|
+ firstExample.setCategoryIdIn(firstLevelIds);
|
|
|
|
+ List<GoodsCategory> firstLevelCategories = goodsCategoryModel.getGoodsCategoryList(firstExample, null);
|
|
|
|
+
|
|
|
|
+ Map<Integer, GoodsCategory> firstLevelMap = new HashMap<>();
|
|
|
|
+ for (GoodsCategory category : firstLevelCategories) {
|
|
|
|
+ firstLevelMap.put(category.getCategoryId(), category);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 构建分类树
|
|
|
|
+ for (GoodsCategory firstCategory : firstLevelCategories) {
|
|
|
|
+ FrontGoodsCategoryVO firstVO = new FrontGoodsCategoryVO(firstCategory);
|
|
|
|
+ firstVO = categoryTreeOptimized(firstVO, firstCategory.getCategoryId(), vendor.getStoreId(), webSite);
|
|
|
|
+ vos.add(firstVO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return SldResponse.success(vos);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 优化后的构造分类树方法
|
|
|
|
+ *
|
|
|
|
+ * @param tree
|
|
|
|
+ * @param categoryId
|
|
|
|
+ * @param storeId
|
|
|
|
+ * @param webSite
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public FrontGoodsCategoryVO categoryTreeOptimized(FrontGoodsCategoryVO tree, Integer categoryId, Long storeId, String webSite) {
|
|
|
|
+ // 查询二级分类
|
|
|
|
+ GoodsCategoryExample example2 = new GoodsCategoryExample();
|
|
|
|
+ example2.setPid(categoryId);
|
|
|
|
+ example2.setState(GoodsCategoryConst.CATEGORY_STATE_1);
|
|
|
|
+ example2.setOrderBy("sort asc, create_time desc");
|
|
|
|
+ List<GoodsCategory> list2 = goodsCategoryModel.getGoodsCategoryList(example2, null);
|
|
|
|
+
|
|
|
|
+ if (!CollectionUtils.isEmpty(list2)) {
|
|
|
|
+ // 将所有二级分类ID转换为逗号分隔的字符串
|
|
|
|
+ StringBuilder secondLevelIdsBuilder = new StringBuilder();
|
|
|
|
+ for (GoodsCategory category : list2) {
|
|
|
|
+ if (secondLevelIdsBuilder.length() > 0) {
|
|
|
|
+ secondLevelIdsBuilder.append(",");
|
|
|
|
+ }
|
|
|
|
+ secondLevelIdsBuilder.append(category.getCategoryId());
|
|
|
|
+ }
|
|
|
|
+ String secondLevelIds = secondLevelIdsBuilder.toString();
|
|
|
|
+
|
|
|
|
+ if (!secondLevelIds.isEmpty()) {
|
|
|
|
+ // 批量查询三级分类
|
|
|
|
+ GoodsCategoryExample example3 = new GoodsCategoryExample();
|
|
|
|
+ example3.setPidIn(secondLevelIds);
|
|
|
|
+ example3.setState(GoodsCategoryConst.CATEGORY_STATE_1);
|
|
|
|
+ example3.setOrderBy("sort asc, create_time desc");
|
|
|
|
+ List<GoodsCategory> list3 = goodsCategoryModel.getGoodsCategoryList(example3, null);
|
|
|
|
+
|
|
|
|
+ // 按二级分类ID分组三级分类
|
|
|
|
+ Map<Integer, List<GoodsCategory>> thirdLevelMap = new HashMap<>();
|
|
|
|
+ for (GoodsCategory thirdCategory : list3) {
|
|
|
|
+ if (!thirdLevelMap.containsKey(thirdCategory.getPid())) {
|
|
|
|
+ thirdLevelMap.put(thirdCategory.getPid(), new ArrayList<>());
|
|
|
|
+ }
|
|
|
|
+ thirdLevelMap.get(thirdCategory.getPid()).add(thirdCategory);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 构造二级和三级分类树
|
|
|
|
+ List<FrontGoodsCategoryVO> vos2 = new ArrayList<>();
|
|
|
|
+ for (GoodsCategory goodsCategory2 : list2) {
|
|
|
|
+ FrontGoodsCategoryVO tree2 = new FrontGoodsCategoryVO(goodsCategory2);
|
|
|
|
+ // 没有图片就用默认图片
|
|
|
|
+ if (StringUtils.isEmpty(goodsCategory2.getCategoryImage())) {
|
|
|
|
+ tree2.setCategoryImage(FileUrlUtil.getFileUrl(stringRedisTemplate.opsForValue().get("default_goods_cate_grade2_image"), null));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 获取当前二级分类下的三级分类
|
|
|
|
+ List<FrontGoodsCategoryVO> vos3 = new ArrayList<>();
|
|
|
|
+ List<GoodsCategory> thirdCategories = thirdLevelMap.get(goodsCategory2.getCategoryId());
|
|
|
|
+ if (!CollectionUtils.isEmpty(thirdCategories)) {
|
|
|
|
+ for (GoodsCategory goodsCategory3 : thirdCategories) {
|
|
|
|
+ FrontGoodsCategoryVO tree3 = new FrontGoodsCategoryVO(goodsCategory3);
|
|
|
|
+ // 没有图片就用默认图片
|
|
|
|
+ if (StringUtils.isEmpty(goodsCategory3.getCategoryImage())) {
|
|
|
|
+ tree3.setCategoryImage(FileUrlUtil.getFileUrl(stringRedisTemplate.opsForValue().get("default_goods_cate_grade3_image"), null));
|
|
|
|
+ }
|
|
|
|
+ vos3.add(tree3);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!CollectionUtils.isEmpty(vos3)) {
|
|
|
|
+ tree2.setChildren(vos3);
|
|
|
|
+ vos2.add(tree2);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ tree.setChildren(vos2);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return tree;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|