Authored by chenchao

Merge branch 'dev_order_6.8.6' into test6.8.6

... ... @@ -251,7 +251,7 @@ public class SellerOrderController {
/**
* 变价计算
* 仅仅支持6.8.3,从6.8.4后使用 {@link #computeAdjustPrice(int, int, BigDecimal, String, int, int)}
* 仅仅支持6.8.3,从6.8.4后使用 {@link #computeAdjustPrice(int, int, BigDecimal, String, int, int, Integer)}
* @since 6.8.3
* @deprecated 6.8.4
* @param uid
... ...
package com.yohoufo.order.model.response;
import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
import com.yohobuy.ufo.model.order.bo.PlatformFee;
import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail;
import com.yohobuy.ufo.model.order.vo.AddressInfo;
import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
... ... @@ -95,7 +95,7 @@ public class OrderDetailInfo {
private String isOffline;
/**
* 是否预售
* 是否预售 是 :Y, 否 :N
*/
private String isAdvance;
@Builder
... ...
... ... @@ -27,6 +27,7 @@ import com.yohoufo.order.service.IExpressInfoService;
import com.yohoufo.order.service.IOrderDetailService;
import com.yohoufo.order.service.proxy.DeliveryMinutesService;
import com.yohoufo.order.utils.BuyerOrderUtils;
import com.yohoufo.order.utils.OrderAssist;
import lombok.experimental.Builder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... ... @@ -210,6 +211,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen
//只有卖家在查看买家的订单时才有
assembleSoldPrdCompute(orderDetailInfo, buyerOrder.getSellerUid(), buyerOrderGoods.getSkup());
orderDetailInfo.setAppraiseVideoUrl(buildNode.appraiseVideoUrl);
orderDetailInfo.setIsAdvance(OrderAssist.getOrderIsAdvance(buyerOrder.getAttributes()));
//orderDetailInfo.setDeliverLeftTime(getDeliverLeftTime(buyerUid, orderCode, buyerOrder.getStatus()));
return orderDetailInfo;
}
... ...
... ... @@ -18,6 +18,7 @@ import com.yohoufo.order.constants.ViewType;
import com.yohoufo.order.model.request.OrderListRequest;
import com.yohoufo.order.service.IOrderListService;
import com.yohoufo.order.utils.BuyerOrderUtils;
import com.yohoufo.order.utils.OrderAssist;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... ... @@ -200,10 +201,16 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements
orderListInfo.setCreateTime(DateUtil.formatDate(buyerOrder.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
setAddressInfo(orderListInfo);
orderListInfo.setAppraiseVideoUrl(appraiseVideo.get(buyerOrder.getOrderCode()));
orderListInfo.setIsAdvance(OrderAssist.getOrderIsAdvance(buyerOrder.getAttributes()));
return orderListInfo;
}
abstract void setAddressInfo(OrderListInfo orderListInfo);
/**
* 重置动态数据
* @param list
* @param type
*/
protected abstract void resetDynamicProporties(List<OrderListInfo> list,int type);
}
... ...
... ... @@ -36,6 +36,7 @@ import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
import com.yohoufo.order.service.wrapper.SellerOrderTimeoutWrapper;
import com.yohoufo.order.utils.LoggerUtils;
import com.yohoufo.order.utils.OrderAssist;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -325,10 +326,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
OrderDetailInfo orderDetailInfo = new OrderDetailInfo();
orderDetailInfo.setUid(order.getUid());
orderDetailInfo.setOrderCode(getOrderCode(skupStatus, order));
Integer storageNum = sellerOrderGoods.getNum();
Integer leftTime = calLeftTime(OrderInfo.SELLER_PAY_TIMEOUT, order.getCreateTime());
List<ButtonShowBo> buttons = getButtons(ViewType.DETAIL, storageNum, sellerType, order.getPayment(), skupStatus, leftTime);
... ... @@ -364,7 +362,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
orderDetailInfo.setIsPaid(getIsPaid(skupStatus));
orderDetailInfo.setSecendLevelCreateTime(order.getCreateTime());
orderDetailInfo.setCreateTime(DateUtil.formatDate(order.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
orderDetailInfo.setIsAdvance(OrderAssist.getSkupIsAdvance(sellerOrderGoods.getAttributes()));
return orderDetailInfo;
}
... ...
... ... @@ -29,7 +29,6 @@ import com.yohoufo.order.service.IOrderListService;
import com.yohoufo.order.service.cache.OrderCacheService;
import com.yohoufo.order.service.proxy.ProductProxyService;
import com.yohoufo.order.service.proxy.UserProxyService;
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
import com.yohoufo.order.service.wrapper.SellerOrderTimeoutWrapper;
import com.yohoufo.order.utils.LoggerUtils;
... ... @@ -290,6 +289,7 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde
if (SHOW_OVER_FLOW_PRICE_STATUS.contains(skupStatus.getCode())){
orderListInfo.setTips(overPriceTipsMap.get(OrderAssist.overFlowPriceKey(sellerOrderGoods.getStorageId(), sellerOrderGoods.getGoodsPrice())));
}
orderListInfo.setIsAdvance(OrderAssist.getSkupIsAdvance(sellerOrderGoods.getAttributes()));
return orderListInfo;
}
... ...
... ... @@ -537,6 +537,7 @@ public class SkupListService {
orderListInfo.setGoodsInfo(productInfo);
//tips
orderListInfo.setTips(overPriceTipsMap.get(OrderAssist.overFlowPriceKey(sellerOrderGoods.getStorageId(), sellerOrderGoods.getGoodsPrice())));
orderListInfo.setIsAdvance(OrderAssist.getSkupIsAdvance(sellerOrderGoods.getAttributes()));
return orderListInfo;
}
}
... ...
package com.yohoufo.order.utils;
import com.yohobuy.ufo.model.order.common.OrderAttributes;
import com.yohobuy.ufo.model.order.constants.SkupType;
import java.math.BigDecimal;
import java.util.Objects;
/**
* Created by chao.chen on 2018/12/20.
*/
public class OrderAssist {
public static final String Y = "Y", N = "N";
public static String overFlowPriceKey(Integer storageId, BigDecimal salePrice){
return new StringBuilder().append(storageId).append("_").append(salePrice).toString();
}
public static String getSkupIsAdvance(Integer attribute){
return Objects.nonNull(attribute) && SkupType.ADVANCE.getCode() == attribute ? Y : N;
}
public static String getOrderIsAdvance(Integer attribute){
return Objects.nonNull(attribute) && OrderAttributes.ADVANCE_SALE.getCode() == attribute ? Y : N;
}
}
... ...