|
@@ -6,6 +6,7 @@ import com.yohoufo.common.utils.DateUtil; |
|
@@ -6,6 +6,7 @@ import com.yohoufo.common.utils.DateUtil; |
6
|
import com.yohoufo.dal.order.OrdersPayMapper;
|
6
|
import com.yohoufo.dal.order.OrdersPayMapper;
|
7
|
import com.yohoufo.dal.order.model.OrdersPay;
|
7
|
import com.yohoufo.dal.order.model.OrdersPay;
|
8
|
import com.yohoufo.order.mq.DelayTime;
|
8
|
import com.yohoufo.order.mq.DelayTime;
|
|
|
9
|
+import com.yohoufo.order.service.proxy.DeliveryMinutesService;
|
9
|
import org.springframework.beans.factory.annotation.Autowired;
|
10
|
import org.springframework.beans.factory.annotation.Autowired;
|
10
|
import org.springframework.stereotype.Service;
|
11
|
import org.springframework.stereotype.Service;
|
11
|
|
12
|
|
|
@@ -18,12 +19,16 @@ public class OrdersPayService { |
|
@@ -18,12 +19,16 @@ public class OrdersPayService { |
18
|
@Autowired
|
19
|
@Autowired
|
19
|
private OrdersPayMapper ordersPayMapper;
|
20
|
private OrdersPayMapper ordersPayMapper;
|
20
|
|
21
|
|
|
|
22
|
+ @Autowired
|
|
|
23
|
+ private DeliveryMinutesService deliveryMinutesService;
|
|
|
24
|
+
|
21
|
public TimeoutBo getDeliverLeftTime(int buyerUid, long orderCode){
|
25
|
public TimeoutBo getDeliverLeftTime(int buyerUid, long orderCode){
|
22
|
OrdersPay ordersPay = ordersPayMapper.selectOrdersPay(orderCode, buyerUid);
|
26
|
OrdersPay ordersPay = ordersPayMapper.selectOrdersPay(orderCode, buyerUid);
|
23
|
if (ordersPay == null){
|
27
|
if (ordersPay == null){
|
24
|
return null;
|
28
|
return null;
|
25
|
}
|
29
|
}
|
26
|
- int timelimit = DelayTime.MINUTES_36_HOURS * 60;
|
30
|
+ //int timelimit = DelayTime.MINUTES_36_HOURS * 60;
|
|
|
31
|
+ int timelimit = deliveryMinutesService.getDeliverMinutesThird();
|
27
|
Integer createTime = ordersPay.getCreateTime();
|
32
|
Integer createTime = ordersPay.getCreateTime();
|
28
|
|
33
|
|
29
|
int left = timelimit - (DateUtil.getCurrentTimeSecond()-createTime);
|
34
|
int left = timelimit - (DateUtil.getCurrentTimeSecond()-createTime);
|