Authored by chenjian

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

@@ -179,7 +179,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen @@ -179,7 +179,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen
179 //good info 179 //good info
180 GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods); 180 GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods);
181 if(isOffline) { 181 if(isOffline) {
182 - goodsInfo.setProductName("[门店订单]" + goodsInfo.getProductName()); 182 + goodsInfo.setProductName("【门店订单】" + goodsInfo.getProductName());
183 } 183 }
184 orderDetailInfo.setGoodsInfo(goodsInfo); 184 orderDetailInfo.setGoodsInfo(goodsInfo);
185 //user address 185 //user address
@@ -185,7 +185,7 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements @@ -185,7 +185,7 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements
185 185
186 GoodsInfo goodsInfo = new GoodsInfo(); 186 GoodsInfo goodsInfo = new GoodsInfo();
187 goodsInfo.setColorName(sellerOrderGoods.getColorName()); 187 goodsInfo.setColorName(sellerOrderGoods.getColorName());
188 - goodsInfo.setProductName((isOffline ? "[门店订单]" : "") + sellerOrderGoods.getProductName()); 188 + goodsInfo.setProductName((isOffline ? "【门店订单】" : "") + sellerOrderGoods.getProductName());
189 goodsInfo.setGoodImg(ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU=")); 189 goodsInfo.setGoodImg(ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
190 goodsInfo.setSizeName(sellerOrderGoods.getSizeName()); 190 goodsInfo.setSizeName(sellerOrderGoods.getSizeName());
191 goodsInfo.setGoodPrice(buyerOrderGoods.getGoodsPrice() == null ? "" :buyerOrderGoods.getGoodsPrice().toPlainString()); 191 goodsInfo.setGoodPrice(buyerOrderGoods.getGoodsPrice() == null ? "" :buyerOrderGoods.getGoodsPrice().toPlainString());
@@ -2,16 +2,14 @@ package com.yohoufo.order.service.impl; @@ -2,16 +2,14 @@ package com.yohoufo.order.service.impl;
2 2
3 import com.yohobuy.ufo.model.order.bo.ButtonShowBo; 3 import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
4 import com.yohobuy.ufo.model.order.bo.OrderInfo; 4 import com.yohobuy.ufo.model.order.bo.OrderInfo;
5 -import com.yohobuy.ufo.model.order.common.OrderCodeType;  
6 -import com.yohobuy.ufo.model.order.common.OrderStatus;  
7 -import com.yohobuy.ufo.model.order.common.SkupStatus;  
8 -import com.yohobuy.ufo.model.order.common.TabType; 5 +import com.yohobuy.ufo.model.order.common.*;
9 import com.yohoufo.common.utils.DateUtil; 6 import com.yohoufo.common.utils.DateUtil;
10 import com.yohoufo.dal.order.model.BuyerOrder; 7 import com.yohoufo.dal.order.model.BuyerOrder;
11 import com.yohoufo.order.common.Payment; 8 import com.yohoufo.order.common.Payment;
12 import com.yohoufo.order.model.dto.BuyerPenaltyCalResult; 9 import com.yohoufo.order.model.dto.BuyerPenaltyCalResult;
13 import com.yohoufo.order.model.response.OrderDetailInfo; 10 import com.yohoufo.order.model.response.OrderDetailInfo;
14 import com.yohoufo.order.service.handler.BuyerCancelCompensateComputeHandler; 11 import com.yohoufo.order.service.handler.BuyerCancelCompensateComputeHandler;
  12 +import com.yohoufo.order.utils.BuyerOrderUtils;
15 import org.apache.commons.collections.CollectionUtils; 13 import org.apache.commons.collections.CollectionUtils;
16 import org.slf4j.Logger; 14 import org.slf4j.Logger;
17 import org.slf4j.helpers.MessageFormatter; 15 import org.slf4j.helpers.MessageFormatter;
@@ -39,6 +37,9 @@ public abstract class AbsOrderViewService { @@ -39,6 +37,9 @@ public abstract class AbsOrderViewService {
39 if (CollectionUtils.isEmpty(buttons)){ 37 if (CollectionUtils.isEmpty(buttons)){
40 return buttons; 38 return buttons;
41 } 39 }
  40 +
  41 + disableBuyAgainIfOffline(buyerOrder, buttons);
  42 +
42 //TODO optimized first query out status of order need BuyerPenaltyCalResult 43 //TODO optimized first query out status of order need BuyerPenaltyCalResult
43 int orderStatusCode = buyerOrder.getStatus(); 44 int orderStatusCode = buyerOrder.getStatus();
44 45
@@ -68,6 +69,21 @@ public abstract class AbsOrderViewService { @@ -68,6 +69,21 @@ public abstract class AbsOrderViewService {
68 return buttonsClone; 69 return buttonsClone;
69 } 70 }
70 71
  72 + /**
  73 + * 门店订单,不需要“再次购买”,替换为“查看详情”
  74 + * @param buyerOrder
  75 + * @param buttons
  76 + */
  77 + private void disableBuyAgainIfOffline(final BuyerOrder buyerOrder, final List<ButtonShowBo> buttons) {
  78 + if(BuyerOrderUtils.isOffline(buyerOrder.getAttributes())
  79 + && buttons != null && buttons.contains(ButtonShow.BUY_AGAIN.getBo())) {
  80 + buttons.remove(ButtonShow.BUY_AGAIN.getBo());
  81 + if(!buttons.contains(ButtonShow.SHOW_DETAIL.getBo())) {
  82 + buttons.add(ButtonShow.SHOW_DETAIL.getBo());
  83 + }
  84 + }
  85 + }
  86 +
71 String formatconfirmTips(BuyerPenaltyCalResult bpcr,int orderStatusCode, String temp){ 87 String formatconfirmTips(BuyerPenaltyCalResult bpcr,int orderStatusCode, String temp){
72 Object[] formatParms = new Object[1]; 88 Object[] formatParms = new Object[1];
73 String confirmTips = temp; 89 String confirmTips = temp;