...
|
...
|
@@ -4,6 +4,7 @@ import com.yoho.error.ServiceError; |
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yohobuy.ufo.model.order.bo.OrderInfo;
|
|
|
import com.yohobuy.ufo.model.order.bo.SoldPrdComputeBo;
|
|
|
import com.yohobuy.ufo.model.order.common.ButtonShow;
|
|
|
import com.yohobuy.ufo.model.order.common.SkupStatus;
|
|
|
import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail;
|
|
|
import com.yohoufo.common.utils.DateUtil;
|
...
|
...
|
@@ -22,6 +23,8 @@ import org.slf4j.Logger; |
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
/**
|
|
|
* Created by chenchao on 2018/9/20.
|
|
|
*/
|
...
|
...
|
@@ -141,7 +144,14 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen |
|
|
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(formatButtons(orderStatus, orderStatus.getDetailButtons(tabType)));
|
|
|
orderDetailInfo.setButtons(formatButtons(orderStatus, new ArrayList<>(orderStatus.getDetailButtons(tabType))));
|
|
|
|
|
|
// 买家 买家订单号 需要处理立即支付
|
|
|
// 卖家 卖家订单号 不存在立即支付的按钮
|
|
|
Integer leftTime = getPayLeftTime(buyerOrder.getBuyerOrderStatus(), buyerOrder.getCreateTime());
|
|
|
if (leftTime != null && leftTime <= 0){
|
|
|
orderDetailInfo.getButtons().removeIf(x-> x!=null && ButtonShow.NOW_BUY.getCode() == (x.getCode())) ;
|
|
|
}
|
|
|
|
|
|
OrderDetailInfo.StatusDetail statusDetail = getStatusDetail(buyerOrder, orderStatus, tabType);
|
|
|
orderDetailInfo.setStatusDetail(statusDetail);
|
...
|
...
|
@@ -181,14 +191,11 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen |
|
|
return GoodsInfoConvertor.SellerOrderGoods2GoodsInfo(sellerOrderGoods);
|
|
|
}
|
|
|
|
|
|
Integer getPayLeftTime(TabType actor, Integer orderStatus, int createTime){
|
|
|
boolean isBuyer = actor.equals(TabType.BUY);
|
|
|
boolean isSeller = actor.equals(TabType.SELL);
|
|
|
Integer getPayLeftTime(Integer orderStatus, int createTime){
|
|
|
Integer leftTime = null;
|
|
|
int timeout = OrderInfo.PAY_TIME_SECOND;
|
|
|
|
|
|
boolean isFiredCal = (isBuyer && orderStatus == OrderStatus.WAITING_PAY.getCode())
|
|
|
|| (isSeller && orderStatus == SkupStatus.CAN_NOT_SELL.getCode());
|
|
|
boolean isFiredCal =orderStatus == OrderStatus.WAITING_PAY.getCode();
|
|
|
if(isFiredCal){
|
|
|
leftTime = calLeftTime(timeout, createTime);
|
|
|
}
|
...
|
...
|
|