Authored by chenchao

skup type tag

@@ -219,9 +219,10 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen @@ -219,9 +219,10 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen
219 //good info 219 //good info
220 GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods); 220 GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods);
221 SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes()); 221 SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes());
222 - goodsInfo.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(goodsInfo.getProductName(), skupType)); 222 + goodsInfo.setProductName(goodsInfo.getProductName());
  223 + goodsInfo.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag(skupType));
223 if(isOffline) { 224 if(isOffline) {
224 - goodsInfo.setProductName("【门店订单】" + goodsInfo.getProductName()); 225 + goodsInfo.setTypeTag("门店订单");
225 } 226 }
226 orderDetailInfo.setGoodsInfo(goodsInfo); 227 orderDetailInfo.setGoodsInfo(goodsInfo);
227 //user address 228 //user address
1 package com.yohoufo.order.service.impl; 1 package com.yohoufo.order.service.impl;
2 2
3 -import com.google.common.collect.Lists;  
4 -import com.google.common.collect.Maps;  
5 import com.yohobuy.ufo.model.order.bo.ButtonShowBo; 3 import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
6 import com.yohobuy.ufo.model.order.bo.GoodsInfo; 4 import com.yohobuy.ufo.model.order.bo.GoodsInfo;
7 import com.yohobuy.ufo.model.order.bo.TimeoutBo; 5 import com.yohobuy.ufo.model.order.bo.TimeoutBo;
@@ -21,7 +19,6 @@ import com.yohoufo.order.utils.BuyerOrderUtils; @@ -21,7 +19,6 @@ import com.yohoufo.order.utils.BuyerOrderUtils;
21 import com.yohoufo.order.utils.OrderAssist; 19 import com.yohoufo.order.utils.OrderAssist;
22 import com.yohoufo.order.utils.SellerGoodsHelper; 20 import com.yohoufo.order.utils.SellerGoodsHelper;
23 import org.apache.commons.collections.CollectionUtils; 21 import org.apache.commons.collections.CollectionUtils;
24 -import org.apache.commons.collections.MapUtils;  
25 import org.apache.commons.lang3.StringUtils; 22 import org.apache.commons.lang3.StringUtils;
26 import org.slf4j.Logger; 23 import org.slf4j.Logger;
27 import org.springframework.beans.factory.annotation.Autowired; 24 import org.springframework.beans.factory.annotation.Autowired;
@@ -364,13 +361,15 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements @@ -364,13 +361,15 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements
364 361
365 SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes()); 362 SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes());
366 String goodsName = sellerOrderGoods.getProductName(); 363 String goodsName = sellerOrderGoods.getProductName();
  364 + goodsInfo.setProductName(goodsName);
  365 + String typeTag;
367 if (isOffline){ 366 if (isOffline){
368 - goodsName = "【门店订单】" + goodsName; 367 + typeTag = "门店订单";
369 }else{ 368 }else{
370 - goodsName = SellerGoodsHelper.addFlag2GoodsNameHead(goodsName, skupType); 369 + typeTag = SellerGoodsHelper.buildGoodsTypeTag(skupType);
371 } 370 }
  371 + goodsInfo.setTypeTag(typeTag);
372 372
373 - goodsInfo.setProductName(goodsName);  
374 goodsInfo.setGoodImg(ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU=")); 373 goodsInfo.setGoodImg(ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
375 goodsInfo.setSizeName(sellerOrderGoods.getSizeName()); 374 goodsInfo.setSizeName(sellerOrderGoods.getSizeName());
376 goodsInfo.setGoodPrice(buyerOrderGoods.getGoodsPrice() == null ? "" :buyerOrderGoods.getGoodsPrice().toPlainString()); 375 goodsInfo.setGoodPrice(buyerOrderGoods.getGoodsPrice() == null ? "" :buyerOrderGoods.getGoodsPrice().toPlainString());
@@ -355,8 +355,8 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I @@ -355,8 +355,8 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
355 355
356 GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods); 356 GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods);
357 resetPriceOfProduct(goodsInfo,skupStatus.getCode(), skupType); 357 resetPriceOfProduct(goodsInfo,skupStatus.getCode(), skupType);
358 - goodsInfo.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(goodsInfo.getProductName(), skupType));  
359 - 358 + goodsInfo.setProductName(goodsInfo.getProductName());
  359 + goodsInfo.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag( skupType));
360 orderDetailInfo.setGoodsInfo(goodsInfo); 360 orderDetailInfo.setGoodsInfo(goodsInfo);
361 //tips :最低价格时刻在变,不能缓存 361 //tips :最低价格时刻在变,不能缓存
362 boolean pushFlag = OrderAssist.skupPushWhenHasLowerPrice(soga); 362 boolean pushFlag = OrderAssist.skupPushWhenHasLowerPrice(soga);
@@ -290,7 +290,8 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde @@ -290,7 +290,8 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde
290 290
291 GoodsInfo goodsInfo = new GoodsInfo(); 291 GoodsInfo goodsInfo = new GoodsInfo();
292 goodsInfo.setColorName(sellerOrderGoods.getColorName()); 292 goodsInfo.setColorName(sellerOrderGoods.getColorName());
293 - goodsInfo.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(sellerOrderGoods.getProductName(), skupType)); 293 + goodsInfo.setProductName(sellerOrderGoods.getProductName());
  294 + goodsInfo.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag(skupType));
294 goodsInfo.setGoodImg(ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU=")); 295 goodsInfo.setGoodImg(ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
295 goodsInfo.setSizeName(sellerOrderGoods.getSizeName()); 296 goodsInfo.setSizeName(sellerOrderGoods.getSizeName());
296 goodsInfo.setProductId(sellerOrderGoods.getProductId()); 297 goodsInfo.setProductId(sellerOrderGoods.getProductId());
@@ -555,7 +555,8 @@ public class SkupListService { @@ -555,7 +555,8 @@ public class SkupListService {
555 productInfo.setSizeId(sellerOrderGoods.getSizeId()); 555 productInfo.setSizeId(sellerOrderGoods.getSizeId());
556 productInfo.setSizeName(sellerOrderGoods.getSizeName()); 556 productInfo.setSizeName(sellerOrderGoods.getSizeName());
557 productInfo.setColorName(sellerOrderGoods.getColorName()); 557 productInfo.setColorName(sellerOrderGoods.getColorName());
558 - productInfo.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(sellerOrderGoods.getProductName(), skupType)); 558 + productInfo.setProductName(sellerOrderGoods.getProductName());
  559 + productInfo.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag(skupType));
559 String imageUrl = ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU="); 560 String imageUrl = ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU=");
560 productInfo.setGoodImg(imageUrl); 561 productInfo.setGoodImg(imageUrl);
561 Integer productId; 562 Integer productId;
@@ -87,7 +87,8 @@ public class ShoppingSupport { @@ -87,7 +87,8 @@ public class ShoppingSupport {
87 SkupType skupType = SkupType.getSkupType(skup.getAttributes()); 87 SkupType skupType = SkupType.getSkupType(skup.getAttributes());
88 GoodsInfo goods = new GoodsInfo(); 88 GoodsInfo goods = new GoodsInfo();
89 goods.setSkup(skup.getId()); 89 goods.setSkup(skup.getId());
90 - goods.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(skup.getProductName(),skupType)); 90 + goods.setProductName(skup.getProductName());
  91 + goods.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag(skupType));
91 goods.setColorId(skup.getColorId() == null ? 0 : skup.getColorId()); 92 goods.setColorId(skup.getColorId() == null ? 0 : skup.getColorId());
92 goods.setColorName(skup.getColorName()); 93 goods.setColorName(skup.getColorName());
93 goods.setSizeId(skup.getSizeId() == null ? 0:skup.getSizeId()); 94 goods.setSizeId(skup.getSizeId() == null ? 0:skup.getSizeId());
@@ -29,14 +29,14 @@ public final class SellerGoodsHelper { @@ -29,14 +29,14 @@ public final class SellerGoodsHelper {
29 29
30 public static String buildGoodsFlag(SkupType skupType){ 30 public static String buildGoodsFlag(SkupType skupType){
31 String attrName = skupType.attrName(); 31 String attrName = skupType.attrName();
32 - return attrName == null ? null : String.format("【%s】",attrName); 32 + return attrName == null ? null : attrName;
33 } 33 }
34 34
35 - public static String addFlag2GoodsNameHead(String prdName, SkupType skupType){ 35 + public static String buildGoodsTypeTag(SkupType skupType){
36 if (SkupType.IN_STOCK.equals(skupType)){ 36 if (SkupType.IN_STOCK.equals(skupType)){
37 - return prdName; 37 + return null;
38 } 38 }
39 String goodsFlag = buildGoodsFlag(skupType); 39 String goodsFlag = buildGoodsFlag(skupType);
40 - return StringUtils.isNoneBlank(goodsFlag)? goodsFlag+prdName: prdName; 40 + return goodsFlag;
41 } 41 }
42 } 42 }