Authored by chenjian

门店自提不需要再次购买按钮

... ... @@ -179,7 +179,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen
//good info
GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods);
if(isOffline) {
goodsInfo.setProductName("[门店订单]" + goodsInfo.getProductName());
goodsInfo.setProductName("【门店订单】" + goodsInfo.getProductName());
}
orderDetailInfo.setGoodsInfo(goodsInfo);
//user address
... ...
... ... @@ -185,7 +185,7 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements
GoodsInfo goodsInfo = new GoodsInfo();
goodsInfo.setColorName(sellerOrderGoods.getColorName());
goodsInfo.setProductName((isOffline ? "[门店订单]" : "") + sellerOrderGoods.getProductName());
goodsInfo.setProductName((isOffline ? "【门店订单】" : "") + sellerOrderGoods.getProductName());
goodsInfo.setGoodImg(ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
goodsInfo.setSizeName(sellerOrderGoods.getSizeName());
goodsInfo.setGoodPrice(buyerOrderGoods.getGoodsPrice() == null ? "" :buyerOrderGoods.getGoodsPrice().toPlainString());
... ...
... ... @@ -2,16 +2,14 @@ package com.yohoufo.order.service.impl;
import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
import com.yohobuy.ufo.model.order.bo.OrderInfo;
import com.yohobuy.ufo.model.order.common.OrderCodeType;
import com.yohobuy.ufo.model.order.common.OrderStatus;
import com.yohobuy.ufo.model.order.common.SkupStatus;
import com.yohobuy.ufo.model.order.common.TabType;
import com.yohobuy.ufo.model.order.common.*;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.dal.order.model.BuyerOrder;
import com.yohoufo.order.common.Payment;
import com.yohoufo.order.model.dto.BuyerPenaltyCalResult;
import com.yohoufo.order.model.response.OrderDetailInfo;
import com.yohoufo.order.service.handler.BuyerCancelCompensateComputeHandler;
import com.yohoufo.order.utils.BuyerOrderUtils;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.helpers.MessageFormatter;
... ... @@ -39,6 +37,9 @@ public abstract class AbsOrderViewService {
if (CollectionUtils.isEmpty(buttons)){
return buttons;
}
disableBuyAgainIfOffline(buyerOrder, buttons);
//TODO optimized first query out status of order need BuyerPenaltyCalResult
int orderStatusCode = buyerOrder.getStatus();
... ... @@ -68,6 +69,21 @@ public abstract class AbsOrderViewService {
return buttonsClone;
}
/**
* 门店订单,不需要“再次购买”,替换为“查看详情”
* @param buyerOrder
* @param buttons
*/
private void disableBuyAgainIfOffline(final BuyerOrder buyerOrder, final List<ButtonShowBo> buttons) {
if(BuyerOrderUtils.isOffline(buyerOrder.getAttributes())
&& buttons != null && buttons.contains(ButtonShow.BUY_AGAIN.getBo())) {
buttons.remove(ButtonShow.BUY_AGAIN.getBo());
if(!buttons.contains(ButtonShow.SHOW_DETAIL.getBo())) {
buttons.add(ButtonShow.SHOW_DETAIL.getBo());
}
}
}
String formatconfirmTips(BuyerPenaltyCalResult bpcr,int orderStatusCode, String temp){
Object[] formatParms = new Object[1];
String confirmTips = temp;
... ...