fix[litemall-db]: 购物车商品是否存在需要过滤已删除商品。

This commit is contained in:
Junling Bu
2019-01-29 13:32:56 +08:00
parent 878a921aa2
commit 0a0e9974a6

View File

@@ -114,7 +114,7 @@ public class LitemallCartService {
public boolean checkExist(Integer goodsId) {
LitemallCartExample example = new LitemallCartExample();
example.or().andGoodsIdEqualTo(goodsId).andCheckedEqualTo(true);
example.or().andGoodsIdEqualTo(goodsId).andCheckedEqualTo(true).andDeletedEqualTo(false);
return cartMapper.countByExample(example) != 0;
}
}