商品模块代码提交
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.setIsDel(DeleteEnum.NORMAL.value());
|
||||||
entity.setShopId(shopId);
|
entity.setShopId(shopId);
|
||||||
super.save(entity);
|
super.updateById(entity);
|
||||||
List<ProdSkuDTO> skuList = dto.getSkuList();
|
List<ProdSkuDTO> skuList = dto.getSkuList();
|
||||||
// 商品SKU-ID列表
|
// 商品SKU-ID列表
|
||||||
List<Long> skuIdList = prodSkuMapper.selectListByQueryAs(query().select(ProdSku::getId).eq(ProdSku::getProductId, dto.getId()), Long.class);
|
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数据
|
// 逻辑删除无用的SKU数据
|
||||||
UpdateChain.of(ProdSku.class)
|
UpdateChain.of(ProdSku.class)
|
||||||
.set(ProdSku::getIsDel, DeleteEnum.DELETED.value())
|
.set(ProdSku::getIsDel, DeleteEnum.DELETED.value())
|
||||||
.in(Product::getId, skuIdList)
|
.in(ProdSku::getId, skuIdList)
|
||||||
.eq(Product::getShopId, shopId)
|
.eq(ProdSku::getShopId, shopId)
|
||||||
.update();
|
.update();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue