Authored by qinchao

发货倒计时

... ... @@ -121,7 +121,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
BuyerOrderGoods buyerOrderGoods = buyerOrderGoodsMapper.selectByOrderCode(uid, orderCode);
int skup = buyerOrderGoods.getSkup();
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
int deliveryHours = deliveryMinutesService.getDeliverMinutesThird()/60;//把分钟转小时
int deliveryHours = deliveryMinutesService.getDeliverMinutesThird_hours();//把分钟转小时
inBoxFacade.sellerSkupPaidByBuyer(sellerOrderGoods,orderCode,deliveryHours);
//离发货截止12小时提醒
... ...
... ... @@ -6,6 +6,7 @@ import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.dal.order.OrdersPayMapper;
import com.yohoufo.dal.order.model.OrdersPay;
import com.yohoufo.order.mq.DelayTime;
import com.yohoufo.order.service.proxy.DeliveryMinutesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
... ... @@ -18,12 +19,16 @@ public class OrdersPayService {
@Autowired
private OrdersPayMapper ordersPayMapper;
@Autowired
private DeliveryMinutesService deliveryMinutesService;
public TimeoutBo getDeliverLeftTime(int buyerUid, long orderCode){
OrdersPay ordersPay = ordersPayMapper.selectOrdersPay(orderCode, buyerUid);
if (ordersPay == null){
return null;
}
int timelimit = DelayTime.MINUTES_36_HOURS * 60;
//int timelimit = DelayTime.MINUTES_36_HOURS * 60;
int timelimit = deliveryMinutesService.getDeliverMinutesThird();
Integer createTime = ordersPay.getCreateTime();
int left = timelimit - (DateUtil.getCurrentTimeSecond()-createTime);
... ...
... ... @@ -20,7 +20,14 @@ public class DeliveryMinutesService {
return configReader.getInt("ufo.order.sellerDeliverNoticeThird",120*60);
}
/**
* 发货时间 : 单位小时
* @return
*/
public int getDeliverMinutesThird_hours(){
int minutes = getDeliverMinutesThird();
return minutes/60 ;
}
}
... ...