Authored by Lixiaodi

Merge branch 'test6.9.2' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.2

... ... @@ -398,6 +398,8 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods);
resetPriceOfProduct(goodsInfo,skupStatus.getCode(), skupType);
goodsInfo.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(goodsInfo.getProductName(), skupType));
orderDetailInfo.setGoodsInfo(goodsInfo);
//tips :最低价格时刻在变,不能缓存
boolean pushFlag = OrderAssist.skupPushWhenHasLowerPrice(soga);
... ...
... ... @@ -6,6 +6,7 @@ import com.yoho.error.ServiceError;
import com.yoho.error.exception.ServiceException;
import com.yohobuy.ufo.model.order.common.OrderAttributes;
import com.yohobuy.ufo.model.order.constants.ChangePriceStatus;
import com.yohobuy.ufo.model.order.constants.SkupType;
import com.yohoufo.common.alarm.EventBusPublisher;
import com.yohoufo.common.exception.UfoServiceException;
import com.yohoufo.common.utils.AddressUtil;
... ... @@ -139,8 +140,9 @@ public class ShoppingServiceImpl implements IShoppingService {
response.setAmount(MathUtils.formatStr(chargeResult.getFinalAmount()));
BigDecimal ompensate = sellerFeeService.computeBuyerCompensate(skup);
final SkupType skupType = SkupType.getSkupType(skupGood.getAttributes());
//赔偿金计算
response.setDamagesDesc(shoppingSupport.getDamagesDesc(ompensate));
response.setDamagesDesc(shoppingSupport.getDamagesDesc(ompensate, skupType));
//推荐券(可用券个数)
response.setRecommendedCouponInfo(shoppingSupport.getRecommendedCouponInfo(chargeResult));
... ...
... ... @@ -2,6 +2,7 @@ package com.yohoufo.order.service.support;
import com.google.common.collect.Lists;
import com.yohobuy.ufo.model.order.constants.OrderDetailDesc;
import com.yohobuy.ufo.model.order.constants.SkupType;
import com.yohoufo.common.helper.ImageUrlAssist;
import com.yohoufo.dal.order.model.SellerOrderGoods;
import com.yohobuy.ufo.model.order.constants.OrderConstant;
... ... @@ -13,6 +14,7 @@ import com.yohoufo.order.model.response.PaymentResponse;
import com.yohoufo.order.model.response.PromotionFormula;
import com.yohoufo.order.model.response.RecommendedCouponInfo;
import com.yohoufo.order.utils.MathUtils;
import com.yohoufo.order.utils.SellerGoodsHelper;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
... ... @@ -123,7 +125,7 @@ public class ShoppingSupport {
* @param damagedPrice
* @return
*/
public String getDamagesDesc(BigDecimal damagedPrice){
public String getDamagesDesc(BigDecimal damagedPrice, SkupType skupType){
if (damagedPrice == null){
return "";
}
... ... @@ -135,8 +137,14 @@ public class ShoppingSupport {
具体退换货规则详见《买家须知》
*/
String damagesDesc =
new String(OrderDetailDesc.PaymentTips.DAMAGES_DESC.toCharArray());
String damagesDesc;
if (SellerGoodsHelper.isImperfectGoods(skupType)){
damagesDesc =
new String(OrderDetailDesc.PaymentTips.DAMAGES_DESC_OF_IMPERFECT.toCharArray());
}else {
damagesDesc =
new String(OrderDetailDesc.PaymentTips.DAMAGES_DESC.toCharArray());
}
return String.format(damagesDesc, damagedPrice.toPlainString());
... ...
... ... @@ -70,7 +70,7 @@ public class ProductController {
ProductDetailResp resp = productService.queryProductDetailById(productId);
String hasSecondHandSorts = configReader.getString("ufo.product.secondHandSorts", ""); // 通过配置品类 来限制哪些品类可以二手发布
if (StringUtils.isNotBlank(hasSecondHandSorts)) {
if (StringUtils.isNotBlank(hasSecondHandSorts) && null != resp.getProduct_info()) {
String[] sorts = hasSecondHandSorts.split(",");
ProductInfo p = resp.getProduct_info();
String thisProductSort = p.getMaxSortId().toString();
... ...