Showing
1 changed file
with
16 additions
and
13 deletions
@@ -393,20 +393,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I | @@ -393,20 +393,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I | ||
393 | .statuStr(orderStatus.getStatusStr(tabType)) | 393 | .statuStr(orderStatus.getStatusStr(tabType)) |
394 | .build(); | 394 | .build(); |
395 | 395 | ||
396 | - if(orderStatus.getCode() == OrderStatus.HAS_PAYED.getCode() || orderStatus.getCode() == OrderStatus.SEND_OUT_TIMEOUT.getCode()){ | ||
397 | 396 | ||
398 | - //orderOverTimeService | ||
399 | - OrderOverTime orderOverTime = Optional.ofNullable(buyerOrder.getOrderCode()).map(orderOverTimeService::selectByOrderCode).orElse(null); | ||
400 | - Integer deliverMinute = Optional.ofNullable(orderOverTime).map(OrderOverTime::getDeliveryMinutes).orElse(DelayTime.MINUTES_120_HOURS ); // 对于老订单来说,超时表记录无数据,则默认120小时 | ||
401 | - int delayHours = deliverMinute/60 ;//发货延迟的时间 : 单位 分钟 | ||
402 | - logger.info("getStatusDetail resetDescForSeller , buyerUid {} orderCode is {},statusDetail {},orderOverTime {}, deliverMinute {} ", buyerOrder.getUid(), | ||
403 | - buyerOrder.getOrderCode(),statusDetail,orderOverTime,deliverMinute); | ||
404 | - if(delayHours!=36){ | ||
405 | - statusDetail.setDetailDesc(statusDetail.getDetailDesc().replace("36",""+delayHours)); | ||
406 | - logger.info("getStatusDetail resetDescForSeller after, buyerUid {} orderCode is {},statusDetail {},orderOverTime {} ", buyerOrder.getUid(), | ||
407 | - buyerOrder.getOrderCode(),statusDetail,orderOverTime); | ||
408 | - } | ||
409 | - } | ||
410 | OrderAttributes oa = OrderAttributes.getOrderAttributes(buyerOrder.getAttributes()); | 397 | OrderAttributes oa = OrderAttributes.getOrderAttributes(buyerOrder.getAttributes()); |
411 | 398 | ||
412 | Integer buyerUid = buyerOrder.getUid(); | 399 | Integer buyerUid = buyerOrder.getUid(); |
@@ -437,6 +424,22 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I | @@ -437,6 +424,22 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I | ||
437 | bpcr = buyerCancelCompensateComputeHandler.calBuyerPenaltyCalResult(buyerOrder, targetStatus); | 424 | bpcr = buyerCancelCompensateComputeHandler.calBuyerPenaltyCalResult(buyerOrder, targetStatus); |
438 | detailDesc = String.format(detailDesc, BigDecimalHelper.halfUp(bpcr.getPenaltyAmount()).doubleValue()); | 425 | detailDesc = String.format(detailDesc, BigDecimalHelper.halfUp(bpcr.getPenaltyAmount()).doubleValue()); |
439 | } | 426 | } |
427 | + //发货时间需要替换 | ||
428 | + if(orderStatus.getCode() == OrderStatus.HAS_PAYED.getCode() | ||
429 | + || orderStatus.getCode() == OrderStatus.SEND_OUT_TIMEOUT.getCode()){ | ||
430 | + //orderOverTimeService | ||
431 | + OrderOverTime orderOverTime = Optional.ofNullable(buyerOrder.getOrderCode()).map(orderOverTimeService::selectByOrderCode).orElse(null); | ||
432 | + Integer deliverMinute = Optional.ofNullable(orderOverTime).map(OrderOverTime::getDeliveryMinutes).orElse(DelayTime.MINUTES_120_HOURS ); // 对于老订单来说,超时表记录无数据,则默认120小时 | ||
433 | + int delayHours = deliverMinute/60 ;//发货延迟的时间 : 单位 分钟 | ||
434 | + logger.info("getStatusDetail resetDescForSeller , buyerUid {} orderCode is {},statusDetail {},orderOverTime {}, deliverMinute {} ", buyerOrder.getUid(), | ||
435 | + buyerOrder.getOrderCode(),detailDesc,orderOverTime,deliverMinute); | ||
436 | + //TODO 使用占位符替换 | ||
437 | + if(delayHours!=36){ | ||
438 | + detailDesc = detailDesc.replace("36",""+delayHours); | ||
439 | + logger.info("getStatusDetail resetDescForSeller after, buyerUid {} orderCode is {},statusDetail {},orderOverTime {} ", buyerOrder.getUid(), | ||
440 | + buyerOrder.getOrderCode(), detailDesc, orderOverTime); | ||
441 | + } | ||
442 | + } | ||
440 | return detailDesc; | 443 | return detailDesc; |
441 | } | 444 | } |
442 | 445 |
-
Please register or login to post a comment