diff --git a/ghy-payment/src/main/java/com/ghy/payment/mapper/OrderFineRecordMapper.java b/ghy-payment/src/main/java/com/ghy/payment/mapper/OrderFineRecordMapper.java index 75da3d67..18a83f8f 100644 --- a/ghy-payment/src/main/java/com/ghy/payment/mapper/OrderFineRecordMapper.java +++ b/ghy-payment/src/main/java/com/ghy/payment/mapper/OrderFineRecordMapper.java @@ -10,7 +10,7 @@ import java.util.List; */ public interface OrderFineRecordMapper { - OrderTimeoutRecord selectByDetailIdAndStatus(@Param("orderDetailId") Long orderDetailId, @Param("orderStatus") Integer orderStatus); + List selectByDetailIdAndStatus(@Param("orderDetailId") Long orderDetailId, @Param("orderStatus") Integer orderStatus); List selectList(OrderTimeoutRecord orderTimeoutRecord); diff --git a/ghy-payment/src/main/java/com/ghy/payment/service/impl/OrderFineRecordServiceImpl.java b/ghy-payment/src/main/java/com/ghy/payment/service/impl/OrderFineRecordServiceImpl.java index 5fd5c722..becef1cb 100644 --- a/ghy-payment/src/main/java/com/ghy/payment/service/impl/OrderFineRecordServiceImpl.java +++ b/ghy-payment/src/main/java/com/ghy/payment/service/impl/OrderFineRecordServiceImpl.java @@ -3,6 +3,7 @@ package com.ghy.payment.service.impl; import com.ghy.payment.domain.OrderTimeoutRecord; import com.ghy.payment.mapper.OrderFineRecordMapper; import com.ghy.payment.service.OrderFineRecordService; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -21,7 +22,12 @@ public class OrderFineRecordServiceImpl implements OrderFineRecordService { @Override public OrderTimeoutRecord selectByDetailIdAndStatus(Long orderDetailId, Integer orderStatus) { - return orderFineRecordMapper.selectByDetailIdAndStatus(orderDetailId, orderStatus); + OrderTimeoutRecord orderTimeoutRecord = null; + List orderTimeoutRecords = orderFineRecordMapper.selectByDetailIdAndStatus(orderDetailId, orderStatus); + if (CollectionUtils.isNotEmpty(orderTimeoutRecords)) { + orderTimeoutRecord = orderTimeoutRecords.get(0); + } + return orderTimeoutRecord; } @Override diff --git a/ghy-payment/src/main/resources/mapper/financial/OrderFineRecordMapper.xml b/ghy-payment/src/main/resources/mapper/financial/OrderFineRecordMapper.xml index d539929d..8b71fa33 100644 --- a/ghy-payment/src/main/resources/mapper/financial/OrderFineRecordMapper.xml +++ b/ghy-payment/src/main/resources/mapper/financial/OrderFineRecordMapper.xml @@ -22,7 +22,7 @@