...
|
...
|
@@ -6,10 +6,8 @@ import com.yohobuy.ufo.model.order.bo.SoldPrdComputeBo; |
|
|
import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail;
|
|
|
import com.yohoufo.common.helper.ImageUrlAssist;
|
|
|
import com.yohoufo.common.utils.DateUtil;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrder;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrderGoods;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrderMeta;
|
|
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
import com.yohoufo.dal.order.OrdersPayMapper;
|
|
|
import com.yohoufo.dal.order.model.*;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderStatus;
|
|
|
import com.yohoufo.order.common.Payment;
|
|
|
import com.yohobuy.ufo.model.order.common.TabType;
|
...
|
...
|
@@ -19,6 +17,7 @@ import com.yohobuy.ufo.model.order.bo.OrderInfo; |
|
|
import com.yohoufo.order.model.request.OrderRequest;
|
|
|
import com.yohoufo.order.model.response.GoodsInfo;
|
|
|
import com.yohoufo.order.model.response.OrderDetailInfo;
|
|
|
import com.yohoufo.order.mq.DelayTime;
|
|
|
import com.yohoufo.order.service.IExpressInfoService;
|
|
|
import com.yohoufo.order.service.IOrderDetailService;
|
|
|
import lombok.experimental.Builder;
|
...
|
...
|
@@ -34,6 +33,9 @@ public abstract class AbsOrderDetailService implements IOrderDetailService{ |
|
|
private final Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
|
@Autowired
|
|
|
private OrdersPayService ordersPayService;
|
|
|
|
|
|
@Autowired
|
|
|
protected IExpressInfoService expressInfoService;
|
|
|
|
|
|
abstract BuyerOrder getBuyerOrder(int uid, long orderCode);
|
...
|
...
|
@@ -51,6 +53,13 @@ public abstract class AbsOrderDetailService implements IOrderDetailService{ |
|
|
|
|
|
abstract AddressInfo getHiddenAddressInfo(int uid, long orderCode, int skup);
|
|
|
|
|
|
Long getDeliverLeftTime(int buyerUid, long orderCode, Integer orderStatus){
|
|
|
if (OrderStatus.HAS_PAYED.getCode() == orderStatus){
|
|
|
return ordersPayService.getDeliverLeftTime(buyerUid, orderCode);
|
|
|
}else{
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
* 获取订单详情
|
|
|
* @param orderRequest
|
...
|
...
|
@@ -133,10 +142,12 @@ public abstract class AbsOrderDetailService implements IOrderDetailService{ |
|
|
BuyerOrderGoods buyerOrderGoods = buildNode.buyerOrderGoods;
|
|
|
SellerOrderGoods sellerOrderGoods = buildNode.sellerOrderGoods;
|
|
|
AddressInfo userAddress = buildNode.userAddress;
|
|
|
Integer buyerUid;
|
|
|
Long orderCode;
|
|
|
//ready 2 set
|
|
|
OrderDetailInfo orderDetailInfo = new OrderDetailInfo();
|
|
|
orderDetailInfo.setUid(buyerOrder.getUid());
|
|
|
orderDetailInfo.setOrderCode(buyerOrder.getOrderCode());
|
|
|
orderDetailInfo.setUid(buyerUid = buyerOrder.getUid());
|
|
|
orderDetailInfo.setOrderCode(orderCode = buyerOrder.getOrderCode());
|
|
|
orderDetailInfo.setSubmitOrderTimeStr(DateUtil.formatDate(buyerOrder.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
|
|
|
orderDetailInfo.setButtons(orderStatus.getDetailButtons(tabType));
|
|
|
OrderDetailInfo.StatusDetail statusDetail = getStatusDetail(buyerOrder, orderStatus, tabType);
|
...
|
...
|
@@ -170,6 +181,7 @@ public abstract class AbsOrderDetailService implements IOrderDetailService{ |
|
|
//只有卖家在查看买家的订单时才有
|
|
|
assembleSoldPrdCompute(orderDetailInfo, buyerOrder.getSellerUid(), buyerOrderGoods.getSkup());
|
|
|
|
|
|
orderDetailInfo.setDeliverLeftTime(getDeliverLeftTime(buyerUid, orderCode, buyerOrder.getStatus()));
|
|
|
return orderDetailInfo;
|
|
|
}
|
|
|
|
...
|
...
|
|