Authored by LUOXC

fixbug

... ... @@ -215,8 +215,8 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen
if (leftTime != null && leftTime <= 0){
orderDetailInfo.getButtons().removeIf(x-> x!=null && ButtonShow.NOW_BUY.getCode() == (x.getCode())) ;
}
OrderDetailInfo.StatusDetail statusDetail = getStatusDetail(buyerOrder, orderStatus, tabType);
SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes());
OrderDetailInfo.StatusDetail statusDetail = getStatusDetail(skupType, buyerOrder, orderStatus, tabType);
orderDetailInfo.setStatusDetail(statusDetail);
boolean isOffline = BuyerOrderUtils.isOffline(buyerOrder.getAttributes());
... ... @@ -224,7 +224,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen
//good info
GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods);
SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes());
goodsInfo.setProductName(goodsInfo.getProductName());
goodsInfo.setTypeTag(buildOrderTypeTag(buyerOrder.getAttributes(), skupType));
if(isOffline) {
... ... @@ -335,7 +335,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen
* @param orderStatus
* @return
*/
protected abstract OrderDetailInfo.StatusDetail getStatusDetail(BuyerOrder buyerOrder,OrderStatus orderStatus, TabType tabType) ;
protected abstract OrderDetailInfo.StatusDetail getStatusDetail(SkupType skupType, BuyerOrder buyerOrder,OrderStatus orderStatus, TabType tabType) ;
/**
* 用于从cache中获取数据后,重置动态数据
... ...
... ... @@ -180,7 +180,7 @@ public class BuyerOrderDetailService extends AbsOrderDetailService implements IO
}
@Override
protected OrderDetailInfo.StatusDetail getStatusDetail(BuyerOrder buyerOrder,OrderStatus orderStatus, TabType tabType) {
protected OrderDetailInfo.StatusDetail getStatusDetail(SkupType skupType, BuyerOrder buyerOrder,OrderStatus orderStatus, TabType tabType) {
OrderDetailInfo.StatusDetail statusDetail = OrderDetailInfo.StatusDetail.builder()
.status(orderStatus.getCode())
.statuStr(orderStatus.getStatusStr(tabType))
... ...
... ... @@ -8,6 +8,7 @@ import com.yoho.error.exception.ServiceException;
import com.yohobuy.ufo.model.order.bo.*;
import com.yohobuy.ufo.model.order.common.*;
import com.yohobuy.ufo.model.order.constants.OrderConstant;
import com.yohobuy.ufo.model.order.constants.OrderDetailDesc;
import com.yohobuy.ufo.model.order.constants.SkupType;
import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail;
import com.yohobuy.ufo.model.order.vo.AddressInfo;
... ... @@ -426,7 +427,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
* @return
*/
@Override
protected OrderDetailInfo.StatusDetail getStatusDetail(BuyerOrder buyerOrder,OrderStatus orderStatus, TabType tabType) {
protected OrderDetailInfo.StatusDetail getStatusDetail(SkupType skupType,BuyerOrder buyerOrder,OrderStatus orderStatus, TabType tabType) {
OrderDetailInfo.StatusDetail statusDetail = OrderDetailInfo.StatusDetail.builder()
.status(orderStatus.getCode())
.statuStr(orderStatus.getStatusStr(tabType))
... ... @@ -446,14 +447,14 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
if(ActionStatusHold.getSellerShowExpressStatusList().contains(orderStatus.getCode())){
statusDetail.setExpressShow(true);
}
String detailDesc = formatDetailDesc(buyerOrder, orderStatus, tabType);
String detailDesc = formatDetailDesc(skupType, buyerOrder, orderStatus, tabType);
statusDetail.setDetailDesc(detailDesc);
return statusDetail;
}
private String formatDetailDesc(BuyerOrder buyerOrder,OrderStatus orderStatus, TabType tabType){
private String formatDetailDesc(SkupType skupType, BuyerOrder buyerOrder,OrderStatus orderStatus, TabType tabType){
OrderAttributes oa = OrderAttributes.getOrderAttributes(buyerOrder.getAttributes());
String detailDesc = orderStatus.getDetailDesc(tabType,oa);
if (Objects.nonNull(orderStatus)
... ... @@ -478,6 +479,9 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
buyerOrder.getOrderCode(), detailDesc, orderOverTime);
}
}
if (BuyerOrderUtils.isQuickDeliverDeposit(skupType, buyerOrder)) {
detailDesc = OrderDetailDesc.Seller.TRADE_DONE_QUICK_DELIVER;
}
return detailDesc;
}
... ...
... ... @@ -61,6 +61,13 @@ public class BuyerOrderUtils {
return isDeposit(buyerOrder.getAttributes());
}
/**
* 是否闪购寄存订单
*/
public static boolean isQuickDeliverDeposit(SkupType skupType, BuyerOrder buyerOrder) {
return skupType == SkupType.QUICK_DELIVER && isDeposit(buyerOrder.getAttributes());
}
public static boolean isQuickDeliver(Integer orderAttrCode){
return Objects.nonNull(orderAttrCode) && Objects.equals(OrderAttributes.QUICK_DELIVER.getCode(), orderAttrCode);
... ...