商品模块代码提交
This commit is contained in:
@@ -147,25 +147,9 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||
|
||||
@Override
|
||||
public boolean deleteProduct(Long id) {
|
||||
Long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
return super.remove(query().eq(Product::getId, id).eq(Product::getShopId, shopId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disableProduct(Long id) {
|
||||
Long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
return UpdateChain.of(Product.class)
|
||||
//.set(Product::getStatus, StatusEnum.DISABLE.value())
|
||||
.eq(Product::getId, id)
|
||||
.eq(Product::getShopId, shopId)
|
||||
.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean enableProduct(Long id) {
|
||||
Long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
return UpdateChain.of(Product.class)
|
||||
//.set(Product::getStatus, StatusEnum.ENABLED.value())
|
||||
.set(Product::getIsDel, DeleteEnum.DELETED.value())
|
||||
.eq(Product::getId, id)
|
||||
.eq(Product::getShopId, shopId)
|
||||
.update();
|
||||
|
||||
Reference in New Issue
Block a user