支付 码 无订单时

This commit is contained in:
2025-03-26 10:12:40 +08:00
parent 43dddcf397
commit 89a6cc0eb5

View File

@@ -279,6 +279,9 @@ public class PayServiceImpl implements PayService {
AssertUtil.isBlank(payParam.getOpenId(), "用户小程序ID不能为空");
OrderInfo orderInfo;
if (payParam.getCheckOrderPay().getOrderId() == null) {
if (payParam.getCheckOrderPay().getOrderAmount() == null || payParam.getCheckOrderPay().getOrderAmount().compareTo(BigDecimal.ZERO) <= 0) {
throw new CzgException("支付金额不合法");
}
orderInfo = orderInfoService.createPayOrder(payParam.getShopId(), payParam.getCheckOrderPay().getOrderAmount(),
payParam.getCheckOrderPay().getRemark());
} else {