Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b9e023df97
|
|
@ -164,6 +164,7 @@ public class PayServiceImpl implements PayService {
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public CzgResult<Object> vipPayOrder(OrderPayParamDTO payParam) {
|
public CzgResult<Object> vipPayOrder(OrderPayParamDTO payParam) {
|
||||||
|
AssertUtil.isNull(payParam.getCheckOrderPay().getUserId(), "会员支付,订单用户不能为空");
|
||||||
OrderInfo orderInfo = checkPay(payParam.getCheckOrderPay());
|
OrderInfo orderInfo = checkPay(payParam.getCheckOrderPay());
|
||||||
ShopUser shopUser = new ShopUser();
|
ShopUser shopUser = new ShopUser();
|
||||||
if ("scanCode".equals(payParam.getPayType())) {
|
if ("scanCode".equals(payParam.getPayType())) {
|
||||||
|
|
@ -503,7 +504,7 @@ public class PayServiceImpl implements PayService {
|
||||||
}
|
}
|
||||||
if (isPay) {
|
if (isPay) {
|
||||||
orderInfo.setRefundAmount(orderInfo.getRefundAmount().add(param.getRefundAmount()));
|
orderInfo.setRefundAmount(orderInfo.getRefundAmount().add(param.getRefundAmount()));
|
||||||
if (orderInfo.getRefundAmount().compareTo(orderInfo.getPayAmount()) < 0) {
|
if (orderInfo.getRefundAmount().compareTo(orderInfo.getPayAmount()) > 0) {
|
||||||
throw new ValidateException("退单失败,可退金额不足");
|
throw new ValidateException("退单失败,可退金额不足");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue