fix: 数据库库存更改为decimal退款数量判断失效修复

This commit is contained in:
张松
2024-12-19 17:24:16 +08:00
parent f90829fee2
commit f78396a4ba

View File

@@ -876,7 +876,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
if (tbOrderDetail == null) {
throw new BadRequestException("购物车商品不存在或已退单");
}
if (cashierCart.getNumber().equals(removeCartDTO.getNum())) {
if (cashierCart.getNumber().compareTo(removeCartDTO.getNum()) == 0) {
cashierCartMapper.update(null, new LambdaUpdateWrapper<TbCashierCart>()
.eq(TbCashierCart::getId, cashierCart.getId())
.set(TbCashierCart::getStatus, "return"));