会员余额支付缺陷修复
This commit is contained in:
@@ -661,7 +661,6 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (cashierCart.getOrderId() == null) {
|
if (cashierCart.getOrderId() == null) {
|
||||||
throw new BadRequestException("此商品还未下单,无需退单");
|
throw new BadRequestException("此商品还未下单,无需退单");
|
||||||
}
|
}
|
||||||
@@ -1381,7 +1380,8 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (shopEatTypeInfoDTO.isIncrMaterId() && "pending".equals(orderInfo.getStatus())) {
|
if (shopEatTypeInfoDTO.isIncrMaterId() && "pending".equals(orderInfo.getStatus())) {
|
||||||
String key = RedisConstant.getMasterIdKey(createOrderDTO.getShopId(), cn.ysk.cashier.utils.DateUtils.getDay(), orderInfo.getTableId());;
|
String key = RedisConstant.getMasterIdKey(createOrderDTO.getShopId(), cn.ysk.cashier.utils.DateUtils.getDay(), orderInfo.getTableId());
|
||||||
|
;
|
||||||
redisTemplate.delete(key);
|
redisTemplate.delete(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1636,7 +1636,9 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
orderInfo.setDiscountRatio(BigDecimal.valueOf(payDTO.getDiscount()));
|
orderInfo.setDiscountRatio(BigDecimal.valueOf(payDTO.getDiscount()));
|
||||||
orderInfo.setDiscountAmount(orderInfo.getAmount().subtract(finalAmount));
|
orderInfo.setDiscountAmount(orderInfo.getAmount().subtract(finalAmount));
|
||||||
}
|
}
|
||||||
orderInfo.setMemberId(Convert.toStr(payDTO.getVipUserId()));
|
if (StrUtil.isEmpty(orderInfo.getMemberId())) {
|
||||||
|
orderInfo.setMemberId(Convert.toStr(payDTO.getVipUserId()));
|
||||||
|
}
|
||||||
orderInfoMapper.updateById(orderInfo);
|
orderInfoMapper.updateById(orderInfo);
|
||||||
|
|
||||||
//更新购物车状态
|
//更新购物车状态
|
||||||
@@ -1653,7 +1655,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
.eq(TbOrderDetail::getOrderId, orderInfo.getId())
|
.eq(TbOrderDetail::getOrderId, orderInfo.getId())
|
||||||
.eq(TbOrderDetail::getUseType, orderInfo.getUseType())
|
.eq(TbOrderDetail::getUseType, orderInfo.getUseType())
|
||||||
.eq(TbOrderDetail::getStatus, "unpaid")
|
.eq(TbOrderDetail::getStatus, "unpaid")
|
||||||
.setSql(StrUtil.format("price_amount=price*num*{}", payDTO.getDiscount() == null ? 1: payDTO.getDiscount()))
|
.setSql(StrUtil.format("price_amount=price*num*{}", payDTO.getDiscount() == null ? 1 : payDTO.getDiscount()))
|
||||||
.set(TbOrderDetail::getStatus, "closed"));
|
.set(TbOrderDetail::getStatus, "closed"));
|
||||||
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
|||||||
Reference in New Issue
Block a user