|
@ -2,6 +2,7 @@ package com.qs.serve.modules.tbs.common.util; |
|
|
|
|
|
|
|
|
import com.qs.serve.common.util.CollectionUtil; |
|
|
import com.qs.serve.common.util.CollectionUtil; |
|
|
import com.qs.serve.common.util.SpringUtils; |
|
|
import com.qs.serve.common.util.SpringUtils; |
|
|
|
|
|
import com.qs.serve.common.util.StringUtils; |
|
|
import com.qs.serve.modules.goods.entity.GoodsCategory; |
|
|
import com.qs.serve.modules.goods.entity.GoodsCategory; |
|
|
import com.qs.serve.modules.goods.entity.GoodsSku; |
|
|
import com.qs.serve.modules.goods.entity.GoodsSku; |
|
|
import com.qs.serve.modules.goods.entity.GoodsSpu; |
|
|
import com.qs.serve.modules.goods.entity.GoodsSpu; |
|
@ -46,6 +47,7 @@ public class TbsBudgetConditionUtil { |
|
|
GoodsCategory category3 = goodsCategoryService.getById(goodsSpu.getCategoryThird()); |
|
|
GoodsCategory category3 = goodsCategoryService.getById(goodsSpu.getCategoryThird()); |
|
|
TbsBudgetCondition condition = new TbsBudgetCondition(); |
|
|
TbsBudgetCondition condition = new TbsBudgetCondition(); |
|
|
condition.setBudgetId(budgetId); |
|
|
condition.setBudgetId(budgetId); |
|
|
|
|
|
condition.setBrandId(category1.getId()+""); |
|
|
condition.setTargetType(TbsGoodsType.sku.name()); |
|
|
condition.setTargetType(TbsGoodsType.sku.name()); |
|
|
condition.setTargetId(sku.getId()); |
|
|
condition.setTargetId(sku.getId()); |
|
|
condition.setTargetCode(sku.getSkuCode()); |
|
|
condition.setTargetCode(sku.getSkuCode()); |
|
@ -64,6 +66,7 @@ public class TbsBudgetConditionUtil { |
|
|
TbsBudgetCondition condition = new TbsBudgetCondition(); |
|
|
TbsBudgetCondition condition = new TbsBudgetCondition(); |
|
|
condition.setBudgetId(budgetId); |
|
|
condition.setBudgetId(budgetId); |
|
|
condition.setTargetType(TbsGoodsType.spu.name()); |
|
|
condition.setTargetType(TbsGoodsType.spu.name()); |
|
|
|
|
|
condition.setBrandId(category1.getId()+""); |
|
|
condition.setTargetId(goodsSpu.getId()); |
|
|
condition.setTargetId(goodsSpu.getId()); |
|
|
condition.setTargetCode(goodsSpu.getSpuCode()); |
|
|
condition.setTargetCode(goodsSpu.getSpuCode()); |
|
|
condition.setTargetName(goodsSpu.getName()); |
|
|
condition.setTargetName(goodsSpu.getName()); |
|
@ -99,6 +102,9 @@ public class TbsBudgetConditionUtil { |
|
|
condition.setTargetName(category.getName()); |
|
|
condition.setTargetName(category.getName()); |
|
|
condition.setTargetLevelPathIds(category.getLevelPath()); |
|
|
condition.setTargetLevelPathIds(category.getLevelPath()); |
|
|
condition.setTargetLevelPathNames(category.getLevelPathNames()); |
|
|
condition.setTargetLevelPathNames(category.getLevelPathNames()); |
|
|
|
|
|
if(StringUtils.hasText(category.getLevelPath())){ |
|
|
|
|
|
condition.setBrandId(category.getLevelPath().split("_")[0]); |
|
|
|
|
|
} |
|
|
budgetConditions.add(condition); |
|
|
budgetConditions.add(condition); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|