Authored by LUOXC

fix bug

@@ -52,6 +52,7 @@ import com.yohoufo.order.utils.PaymentHelper; @@ -52,6 +52,7 @@ import com.yohoufo.order.utils.PaymentHelper;
52 import com.yohoufo.order.utils.ServiceExceptions; 52 import com.yohoufo.order.utils.ServiceExceptions;
53 import lombok.val; 53 import lombok.val;
54 import org.apache.commons.collections.CollectionUtils; 54 import org.apache.commons.collections.CollectionUtils;
  55 +import org.apache.commons.lang3.ObjectUtils;
55 import org.apache.commons.lang3.StringUtils; 56 import org.apache.commons.lang3.StringUtils;
56 import org.slf4j.Logger; 57 import org.slf4j.Logger;
57 import org.springframework.beans.factory.annotation.Autowired; 58 import org.springframework.beans.factory.annotation.Autowired;
@@ -1304,7 +1305,8 @@ public class PaymentServiceImpl implements IPaymentService { @@ -1304,7 +1305,8 @@ public class PaymentServiceImpl implements IPaymentService {
1304 1305
1305 // 获取支付成功记录 1306 // 获取支付成功记录
1306 OrdersPay ordersPay = ordersPayMapper.selectOrdersPay(orderInfo.getOrderCode(), orderInfo.getUid()); 1307 OrdersPay ordersPay = ordersPayMapper.selectOrdersPay(orderInfo.getOrderCode(), orderInfo.getUid());
1307 - if (ordersPay == null || ordersPay.getAmount() == null) { 1308 +
  1309 + if (!ObjectUtils.allNotNull(ordersPay, ordersPay.getAmount(), ordersPay.getPayment())) {
1308 logger.warn("manual refund paid record not exist.orderCode is {}", orderCode); 1310 logger.warn("manual refund paid record not exist.orderCode is {}", orderCode);
1309 ServiceExceptions.throwServiceException("订单[" + orderCode + "],尚未支付!"); 1311 ServiceExceptions.throwServiceException("订单[" + orderCode + "],尚未支付!");
1310 } 1312 }