商品模块代码提交
This commit is contained in:
parent
41116b8d7b
commit
0e7475d894
|
|
@ -211,7 +211,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
|||
}
|
||||
entity.setIsDel(DeleteEnum.NORMAL.value());
|
||||
entity.setShopId(shopId);
|
||||
super.save(entity);
|
||||
super.updateById(entity);
|
||||
List<ProdSkuDTO> skuList = dto.getSkuList();
|
||||
// 商品SKU-ID列表
|
||||
List<Long> skuIdList = prodSkuMapper.selectListByQueryAs(query().select(ProdSku::getId).eq(ProdSku::getProductId, dto.getId()), Long.class);
|
||||
|
|
@ -238,8 +238,8 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
|||
// 逻辑删除无用的SKU数据
|
||||
UpdateChain.of(ProdSku.class)
|
||||
.set(ProdSku::getIsDel, DeleteEnum.DELETED.value())
|
||||
.in(Product::getId, skuIdList)
|
||||
.eq(Product::getShopId, shopId)
|
||||
.in(ProdSku::getId, skuIdList)
|
||||
.eq(ProdSku::getShopId, shopId)
|
||||
.update();
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue