Authored by chenchao

change owner

@@ -53,4 +53,5 @@ public class AmountDetailBo { @@ -53,4 +53,5 @@ public class AmountDetailBo {
53 53
54 private double depositAmount; 54 private double depositAmount;
55 55
  56 + private double quickDeliveServiceAmount;
56 } 57 }
@@ -200,6 +200,10 @@ public class OrderDetailInfo { @@ -200,6 +200,10 @@ public class OrderDetailInfo {
200 * 实付金额 200 * 实付金额
201 */ 201 */
202 String realPayPrice; 202 String realPayPrice;
  203 +
  204 + String depositPrice;
  205 +
  206 + String quickDeliveServicePrice;
203 } 207 }
204 208
205 209
@@ -40,6 +40,7 @@ import org.springframework.beans.factory.annotation.Autowired; @@ -40,6 +40,7 @@ import org.springframework.beans.factory.annotation.Autowired;
40 40
41 import java.util.ArrayList; 41 import java.util.ArrayList;
42 import java.util.List; 42 import java.util.List;
  43 +import java.util.Objects;
43 import java.util.Optional; 44 import java.util.Optional;
44 45
45 /** 46 /**
@@ -225,7 +226,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen @@ -225,7 +226,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen
225 GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods); 226 GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods);
226 SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes()); 227 SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes());
227 goodsInfo.setProductName(goodsInfo.getProductName()); 228 goodsInfo.setProductName(goodsInfo.getProductName());
228 - goodsInfo.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag(skupType)); 229 + goodsInfo.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag(BuyerOrderUtils.convertSkupTypeIfNeed(buyerOrder.getAttributes(), skupType)));
229 if(isOffline) { 230 if(isOffline) {
230 goodsInfo.setTypeTag("门店订单"); 231 goodsInfo.setTypeTag("门店订单");
231 } 232 }
@@ -267,8 +268,19 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen @@ -267,8 +268,19 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen
267 .activityCutPrice(MathUtils.formatStr(amountDetailBo.getActivityCutAmount())) 268 .activityCutPrice(MathUtils.formatStr(amountDetailBo.getActivityCutAmount()))
268 .couponCutPrice(MathUtils.formatStr(amountDetailBo.getCouponCutAmount())) 269 .couponCutPrice(MathUtils.formatStr(amountDetailBo.getCouponCutAmount()))
269 .shippingCouponCutPrice(MathUtils.formatStr(amountDetailBo.getShippingCouponCutAmount())) 270 .shippingCouponCutPrice(MathUtils.formatStr(amountDetailBo.getShippingCouponCutAmount()))
  271 +
270 .realPayPrice(buyerOrder.getAmount() == null ? "0" : buyerOrder.getAmount().toPlainString()) 272 .realPayPrice(buyerOrder.getAmount() == null ? "0" : buyerOrder.getAmount().toPlainString())
271 .build(); 273 .build();
  274 + OrderAttributes oa = OrderAttributes.getOrderAttributes(buyerOrder.getAttributes());
  275 +
  276 + if (Objects.equals(OrderAttributes.QUICK_DELIVER, oa)){
  277 + priceInfo.setQuickDeliveServicePrice(MathUtils.formatStr(amountDetailBo.getDepositAmount()));
  278 + }
  279 +
  280 + if (Objects.equals(OrderAttributes.DEPOSITE, oa)){
  281 + priceInfo.setDepositPrice(MathUtils.formatStr(amountDetailBo.getDepositAmount()));
  282 + }
  283 +
272 SkupTypeCodeSupport.CodeNode codeNode = SkupTypeCodeSupport.explain(buyerOrder.getAttributes()); 284 SkupTypeCodeSupport.CodeNode codeNode = SkupTypeCodeSupport.explain(buyerOrder.getAttributes());
273 if (codeNode.getRegion() == RegionEnum.HONGKONG.getCode()){ 285 if (codeNode.getRegion() == RegionEnum.HONGKONG.getCode()){
274 //tariff 286 //tariff
@@ -281,6 +293,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen @@ -281,6 +293,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen
281 double cutShipPrice = amountDetailBo.getShippingActivityCutAmount(); 293 double cutShipPrice = amountDetailBo.getShippingActivityCutAmount();
282 priceInfo.setShippingActivityCutPrice(MathUtils.formatStr(cutShipPrice)); 294 priceInfo.setShippingActivityCutPrice(MathUtils.formatStr(cutShipPrice));
283 } 295 }
  296 +
284 } else { 297 } else {
285 //priceInfo 298 //priceInfo
286 priceInfo = OrderDetailInfo.PriceInfo.builder() 299 priceInfo = OrderDetailInfo.PriceInfo.builder()
@@ -364,11 +364,12 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements @@ -364,11 +364,12 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements
364 SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes()); 364 SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes());
365 String goodsName = sellerOrderGoods.getProductName(); 365 String goodsName = sellerOrderGoods.getProductName();
366 goodsInfo.setProductName(goodsName); 366 goodsInfo.setProductName(goodsName);
  367 + //
367 String typeTag; 368 String typeTag;
368 if (isOffline){ 369 if (isOffline){
369 typeTag = "门店订单"; 370 typeTag = "门店订单";
370 }else{ 371 }else{
371 - typeTag = SellerGoodsHelper.buildGoodsTypeTag(skupType); 372 + typeTag = SellerGoodsHelper.buildGoodsTypeTag(BuyerOrderUtils.convertSkupTypeIfNeed(buyerOrder.getAttributes(), skupType));
372 } 373 }
373 goodsInfo.setTypeTag(typeTag); 374 goodsInfo.setTypeTag(typeTag);
374 375
@@ -680,6 +680,10 @@ public class ShoppingServiceImpl implements IShoppingService { @@ -680,6 +680,10 @@ public class ShoppingServiceImpl implements IShoppingService {
680 amountDetailBo.setDepositAmount(depositFee.getAmount()); 680 amountDetailBo.setDepositAmount(depositFee.getAmount());
681 } 681 }
682 682
  683 + SingleFeeDetail quickDeliveFee = chargeResult.getQuickDeliverServiceFee();
  684 + if (Objects.nonNull(quickDeliveFee)){
  685 + amountDetailBo.setQuickDeliveServiceAmount(quickDeliveFee.getAmount());
  686 + }
683 //活动券减免金额 687 //活动券减免金额
684 chargeResult.getCouponPayResultList().getCouponPayResultByCouponType(CouponTypeEnum.ACTIVITY_COUPON.getCode()). 688 chargeResult.getCouponPayResultList().getCouponPayResultByCouponType(CouponTypeEnum.ACTIVITY_COUPON.getCode()).
685 ifPresent(tempPayResult -> amountDetailBo.setCouponCutAmount(tempPayResult.getCouponAmount())); 689 ifPresent(tempPayResult -> amountDetailBo.setCouponCutAmount(tempPayResult.getCouponAmount()));
@@ -3,6 +3,7 @@ package com.yohoufo.order.utils; @@ -3,6 +3,7 @@ package com.yohoufo.order.utils;
3 import com.yohobuy.ufo.model.order.bo.OrderInfo; 3 import com.yohobuy.ufo.model.order.bo.OrderInfo;
4 import com.yohobuy.ufo.model.order.common.OrderAttributes; 4 import com.yohobuy.ufo.model.order.common.OrderAttributes;
5 import com.yohobuy.ufo.model.order.common.OrderStatus; 5 import com.yohobuy.ufo.model.order.common.OrderStatus;
  6 +import com.yohobuy.ufo.model.order.constants.SkupType;
6 import com.yohoufo.dal.order.model.BuyerOrder; 7 import com.yohoufo.dal.order.model.BuyerOrder;
7 8
8 import java.util.Objects; 9 import java.util.Objects;
@@ -64,4 +65,10 @@ public class BuyerOrderUtils { @@ -64,4 +65,10 @@ public class BuyerOrderUtils {
64 public static boolean isQuickDeliver(Integer orderAttrCode){ 65 public static boolean isQuickDeliver(Integer orderAttrCode){
65 return Objects.nonNull(orderAttrCode) && Objects.equals(OrderAttributes.QUICK_DELIVER.getCode(), orderAttrCode); 66 return Objects.nonNull(orderAttrCode) && Objects.equals(OrderAttributes.QUICK_DELIVER.getCode(), orderAttrCode);
66 } 67 }
  68 +
  69 +
  70 + public static SkupType convertSkupTypeIfNeed(Integer orderAttrCode, SkupType skupType){
  71 + boolean isDeposit = isDeposit(orderAttrCode);
  72 + return isDeposit ? SkupType.DEPOSIT : skupType;
  73 + }
67 } 74 }