Authored by chenchao

merge format

... ... @@ -393,20 +393,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
.statuStr(orderStatus.getStatusStr(tabType))
.build();
if(orderStatus.getCode() == OrderStatus.HAS_PAYED.getCode() || orderStatus.getCode() == OrderStatus.SEND_OUT_TIMEOUT.getCode()){
//orderOverTimeService
OrderOverTime orderOverTime = Optional.ofNullable(buyerOrder.getOrderCode()).map(orderOverTimeService::selectByOrderCode).orElse(null);
Integer deliverMinute = Optional.ofNullable(orderOverTime).map(OrderOverTime::getDeliveryMinutes).orElse(DelayTime.MINUTES_120_HOURS ); // 对于老订单来说,超时表记录无数据,则默认120小时
int delayHours = deliverMinute/60 ;//发货延迟的时间 : 单位 分钟
logger.info("getStatusDetail resetDescForSeller , buyerUid {} orderCode is {},statusDetail {},orderOverTime {}, deliverMinute {} ", buyerOrder.getUid(),
buyerOrder.getOrderCode(),statusDetail,orderOverTime,deliverMinute);
if(delayHours!=36){
statusDetail.setDetailDesc(statusDetail.getDetailDesc().replace("36",""+delayHours));
logger.info("getStatusDetail resetDescForSeller after, buyerUid {} orderCode is {},statusDetail {},orderOverTime {} ", buyerOrder.getUid(),
buyerOrder.getOrderCode(),statusDetail,orderOverTime);
}
}
OrderAttributes oa = OrderAttributes.getOrderAttributes(buyerOrder.getAttributes());
Integer buyerUid = buyerOrder.getUid();
... ... @@ -437,6 +424,22 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
bpcr = buyerCancelCompensateComputeHandler.calBuyerPenaltyCalResult(buyerOrder, targetStatus);
detailDesc = String.format(detailDesc, BigDecimalHelper.halfUp(bpcr.getPenaltyAmount()).doubleValue());
}
//发货时间需要替换
if(orderStatus.getCode() == OrderStatus.HAS_PAYED.getCode()
|| orderStatus.getCode() == OrderStatus.SEND_OUT_TIMEOUT.getCode()){
//orderOverTimeService
OrderOverTime orderOverTime = Optional.ofNullable(buyerOrder.getOrderCode()).map(orderOverTimeService::selectByOrderCode).orElse(null);
Integer deliverMinute = Optional.ofNullable(orderOverTime).map(OrderOverTime::getDeliveryMinutes).orElse(DelayTime.MINUTES_120_HOURS ); // 对于老订单来说,超时表记录无数据,则默认120小时
int delayHours = deliverMinute/60 ;//发货延迟的时间 : 单位 分钟
logger.info("getStatusDetail resetDescForSeller , buyerUid {} orderCode is {},statusDetail {},orderOverTime {}, deliverMinute {} ", buyerOrder.getUid(),
buyerOrder.getOrderCode(),detailDesc,orderOverTime,deliverMinute);
//TODO 使用占位符替换
if(delayHours!=36){
detailDesc = detailDesc.replace("36",""+delayHours);
logger.info("getStatusDetail resetDescForSeller after, buyerUid {} orderCode is {},statusDetail {},orderOverTime {} ", buyerOrder.getUid(),
buyerOrder.getOrderCode(), detailDesc, orderOverTime);
}
}
return detailDesc;
}
... ...