Authored by qinchao

发货倒计时

@@ -121,7 +121,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -121,7 +121,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
121 BuyerOrderGoods buyerOrderGoods = buyerOrderGoodsMapper.selectByOrderCode(uid, orderCode); 121 BuyerOrderGoods buyerOrderGoods = buyerOrderGoodsMapper.selectByOrderCode(uid, orderCode);
122 int skup = buyerOrderGoods.getSkup(); 122 int skup = buyerOrderGoods.getSkup();
123 SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup); 123 SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
124 - int deliveryHours = deliveryMinutesService.getDeliverMinutesThird()/60;//把分钟转小时 124 + int deliveryHours = deliveryMinutesService.getDeliverMinutesThird_hours();//把分钟转小时
125 inBoxFacade.sellerSkupPaidByBuyer(sellerOrderGoods,orderCode,deliveryHours); 125 inBoxFacade.sellerSkupPaidByBuyer(sellerOrderGoods,orderCode,deliveryHours);
126 126
127 //离发货截止12小时提醒 127 //离发货截止12小时提醒
@@ -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);
@@ -20,7 +20,14 @@ public class DeliveryMinutesService { @@ -20,7 +20,14 @@ public class DeliveryMinutesService {
20 return configReader.getInt("ufo.order.sellerDeliverNoticeThird",120*60); 20 return configReader.getInt("ufo.order.sellerDeliverNoticeThird",120*60);
21 } 21 }
22 22
23 - 23 + /**
  24 + * 发货时间 : 单位小时
  25 + * @return
  26 + */
  27 + public int getDeliverMinutesThird_hours(){
  28 + int minutes = getDeliverMinutesThird();
  29 + return minutes/60 ;
  30 + }
24 31
25 32
26 } 33 }