Merge remote-tracking branch 'origin/master'

This commit is contained in:
张松 2025-03-06 16:29:41 +08:00
commit b9e023df97
1 changed files with 2 additions and 1 deletions

View File

@ -164,6 +164,7 @@ public class PayServiceImpl implements PayService {
@Override
@Transactional
public CzgResult<Object> vipPayOrder(OrderPayParamDTO payParam) {
AssertUtil.isNull(payParam.getCheckOrderPay().getUserId(), "会员支付,订单用户不能为空");
OrderInfo orderInfo = checkPay(payParam.getCheckOrderPay());
ShopUser shopUser = new ShopUser();
if ("scanCode".equals(payParam.getPayType())) {
@ -503,7 +504,7 @@ public class PayServiceImpl implements PayService {
}
if (isPay) {
orderInfo.setRefundAmount(orderInfo.getRefundAmount().add(param.getRefundAmount()));
if (orderInfo.getRefundAmount().compareTo(orderInfo.getPayAmount()) < 0) {
if (orderInfo.getRefundAmount().compareTo(orderInfo.getPayAmount()) > 0) {
throw new ValidateException("退单失败,可退金额不足");
}
}