Authored by chenchao

support imperfect type

... ... @@ -142,7 +142,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
* 预售
*/
private void processPreSaleOrder(OrderInfo orderInfo,SellerOrderGoods sellerOrderGoods){
//TODO 立即消息通知
// 立即消息通知
Integer uid = orderInfo.getUid();
long orderCode = orderInfo.getOrderCode();
... ... @@ -153,10 +153,6 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
String unit = TimeUnit.HOURS.equals(tu) ? DateUtil.UNIT_HOURS : DateUtil.UNIT_DAYS;
inBoxFacade.sellerSkupPaidByBuyer(sellerOrderGoods, orderCode, dtl, unit);
inBoxFacade.buyerFinishPaid(uid, orderCode, dtl, unit);
Integer sellerUid = orderInfo.getSellerUid();
//TODO 35天不发货取消;
//TODO 30天后,从第31天开始到第35天结束,发消息通知卖家
// 记录此订单的发货超时时间期限点
int ts = DateUtil.getCurrentTimeSecond();
... ... @@ -179,6 +175,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
OrderAttributes oa = OrderAttributes.getOrderAttributes(oac=orderInfo.getAttributes());
switch (oa){
case COMMON_IN_STOCK:
case FLAW:
case SECOND_HAND:
processInStockOrder(orderInfo, buyerOrderGoods, sellerOrderGoods);
break;
case ADVANCE_SALE:
... ...
... ... @@ -102,6 +102,8 @@ public class BuyerPenaltyRuleSelector {
String stockCaseName;
switch (orderAttributes) {
case COMMON_IN_STOCK:
case FLAW:
case SECOND_HAND:
stockCaseName = "goodsInStock";
break;
case ADVANCE_SALE:
... ...
... ... @@ -77,7 +77,9 @@ public class OrdersPayService {
timelimit = TimeUtils.secondsFromTimeRange(min, tu);
break;
case COMMON_IN_STOCK:
default:
case FLAW:
case SECOND_HAND:
default:
OrderOverTime orderOverTime = Optional.ofNullable(orderCode).map(orderOverTimeService::selectByOrderCode).orElse(null);
// 对于老订单来说,超时表记录无数据,则默认120小时
Integer deliverMinute = Optional.ofNullable(orderOverTime).map(OrderOverTime::getDeliveryMinutes).orElse(DelayTime.MINUTES_120_HOURS );
... ...