|
@@ -1542,11 +1542,11 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
//规格属性IDS
|
|
//规格属性IDS
|
|
if (StringUtils.isNotBlank(relation.getSpecAttributeIds())){
|
|
if (StringUtils.isNotBlank(relation.getSpecAttributeIds())){
|
|
List<Long> ids = Arrays.asList(relation.getSpecAttributeIds().split(",")).stream().map(x -> Long.valueOf(x)).collect(Collectors.toList());
|
|
List<Long> ids = Arrays.asList(relation.getSpecAttributeIds().split(",")).stream().map(x -> Long.valueOf(x)).collect(Collectors.toList());
|
|
- List<GoodsSpecAttribute> specAttributeList = goodsSpecAttributeService.listByIds(ids);
|
|
|
|
- if (CollectionUtils.isNotEmpty(specAttributeList)){
|
|
|
|
|
|
+// List<GoodsSpecAttribute> specAttributeList = goodsSpecAttributeService.listByIds(ids);
|
|
|
|
+ if (CollectionUtils.isNotEmpty(ids)){
|
|
List<Long> newIds = new ArrayList<>();
|
|
List<Long> newIds = new ArrayList<>();
|
|
- specAttributeList.forEach(item -> {
|
|
|
|
- Long newId = getNewIdByTenant(item.getSpecAttributeId(), GoodsCopyEnum.GOODS_SPEC_ATTRIBUTE.getType(),newTenantId);
|
|
|
|
|
|
+ ids.forEach(item -> {
|
|
|
|
+ Long newId = getNewIdByTenant(item,GoodsCopyEnum.GOODS_SPEC_ATTRIBUTE.getType(),newTenantId);
|
|
// GoodsSpecAttribute newSpecAttribute = goodsSpecAttributeService.getSpecAttrByTenant(item.getName(),item.getCreateTime(),newTenantId);
|
|
// GoodsSpecAttribute newSpecAttribute = goodsSpecAttributeService.getSpecAttrByTenant(item.getName(),item.getCreateTime(),newTenantId);
|
|
if (ObjectUtils.isNotNull(newId)){
|
|
if (ObjectUtils.isNotNull(newId)){
|
|
newIds.add(newId);
|
|
newIds.add(newId);
|