添加商品 规格丢失问题

This commit is contained in:
wangw 2024-10-14 16:35:09 +08:00
parent 68fac45b7a
commit 192605ae90
1 changed files with 1 additions and 2 deletions

View File

@ -459,15 +459,14 @@ public class TbProductServiceImpl implements TbProductService {
tbProductRepository.save(save);
//sku
if (resources.getSkuList() != null) {
List<TbProductSku> skuList = new ArrayList<>();
for (TbProductSku sku : resources.getSkuList()) {
sku.setProductId(String.valueOf(save.getId()));
sku.setShopId(save.getShopId());
sku.setCreatedAt(Instant.now().toEpochMilli());
sku.setUpdatedAt(Instant.now().toEpochMilli());
sku.setIsGrounding(1);
skuList.add(sku);
}
tbProductSkuRepository.saveAll(resources.getSkuList());
}
//保存到sku_result
if ("sku".equals(resources.getTypeEnum())) {