Authored by chenchao

skup type tag

... ... @@ -219,9 +219,10 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen
//good info
GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods);
SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes());
goodsInfo.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(goodsInfo.getProductName(), skupType));
goodsInfo.setProductName(goodsInfo.getProductName());
goodsInfo.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag(skupType));
if(isOffline) {
goodsInfo.setProductName("【门店订单】" + goodsInfo.getProductName());
goodsInfo.setTypeTag("门店订单");
}
orderDetailInfo.setGoodsInfo(goodsInfo);
//user address
... ...
package com.yohoufo.order.service.impl;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
import com.yohobuy.ufo.model.order.bo.GoodsInfo;
import com.yohobuy.ufo.model.order.bo.TimeoutBo;
... ... @@ -21,7 +19,6 @@ import com.yohoufo.order.utils.BuyerOrderUtils;
import com.yohoufo.order.utils.OrderAssist;
import com.yohoufo.order.utils.SellerGoodsHelper;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -364,13 +361,15 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements
SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes());
String goodsName = sellerOrderGoods.getProductName();
goodsInfo.setProductName(goodsName);
String typeTag;
if (isOffline){
goodsName = "【门店订单】" + goodsName;
typeTag = "门店订单";
}else{
goodsName = SellerGoodsHelper.addFlag2GoodsNameHead(goodsName, skupType);
typeTag = SellerGoodsHelper.buildGoodsTypeTag(skupType);
}
goodsInfo.setTypeTag(typeTag);
goodsInfo.setProductName(goodsName);
goodsInfo.setGoodImg(ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
goodsInfo.setSizeName(sellerOrderGoods.getSizeName());
goodsInfo.setGoodPrice(buyerOrderGoods.getGoodsPrice() == null ? "" :buyerOrderGoods.getGoodsPrice().toPlainString());
... ...
... ... @@ -355,8 +355,8 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods);
resetPriceOfProduct(goodsInfo,skupStatus.getCode(), skupType);
goodsInfo.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(goodsInfo.getProductName(), skupType));
goodsInfo.setProductName(goodsInfo.getProductName());
goodsInfo.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag( skupType));
orderDetailInfo.setGoodsInfo(goodsInfo);
//tips :最低价格时刻在变,不能缓存
boolean pushFlag = OrderAssist.skupPushWhenHasLowerPrice(soga);
... ...
... ... @@ -290,7 +290,8 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde
GoodsInfo goodsInfo = new GoodsInfo();
goodsInfo.setColorName(sellerOrderGoods.getColorName());
goodsInfo.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(sellerOrderGoods.getProductName(), skupType));
goodsInfo.setProductName(sellerOrderGoods.getProductName());
goodsInfo.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag(skupType));
goodsInfo.setGoodImg(ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
goodsInfo.setSizeName(sellerOrderGoods.getSizeName());
goodsInfo.setProductId(sellerOrderGoods.getProductId());
... ...
... ... @@ -555,7 +555,8 @@ public class SkupListService {
productInfo.setSizeId(sellerOrderGoods.getSizeId());
productInfo.setSizeName(sellerOrderGoods.getSizeName());
productInfo.setColorName(sellerOrderGoods.getColorName());
productInfo.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(sellerOrderGoods.getProductName(), skupType));
productInfo.setProductName(sellerOrderGoods.getProductName());
productInfo.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag(skupType));
String imageUrl = ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU=");
productInfo.setGoodImg(imageUrl);
Integer productId;
... ...
... ... @@ -87,7 +87,8 @@ public class ShoppingSupport {
SkupType skupType = SkupType.getSkupType(skup.getAttributes());
GoodsInfo goods = new GoodsInfo();
goods.setSkup(skup.getId());
goods.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(skup.getProductName(),skupType));
goods.setProductName(skup.getProductName());
goods.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag(skupType));
goods.setColorId(skup.getColorId() == null ? 0 : skup.getColorId());
goods.setColorName(skup.getColorName());
goods.setSizeId(skup.getSizeId() == null ? 0:skup.getSizeId());
... ...
... ... @@ -29,14 +29,14 @@ public final class SellerGoodsHelper {
public static String buildGoodsFlag(SkupType skupType){
String attrName = skupType.attrName();
return attrName == null ? null : String.format("【%s】",attrName);
return attrName == null ? null : attrName;
}
public static String addFlag2GoodsNameHead(String prdName, SkupType skupType){
public static String buildGoodsTypeTag(SkupType skupType){
if (SkupType.IN_STOCK.equals(skupType)){
return prdName;
return null;
}
String goodsFlag = buildGoodsFlag(skupType);
return StringUtils.isNoneBlank(goodsFlag)? goodsFlag+prdName: prdName;
return goodsFlag;
}
}
... ...