Authored by LUOXC

fixbug

1 package com.yohoufo.order.service.proxy; 1 package com.yohoufo.order.service.proxy;
2 2
3 import com.alibaba.fastjson.JSON; 3 import com.alibaba.fastjson.JSON;
  4 +import com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer;
4 import com.yoho.message.sdk.common.model.SendMessageRspBo; 5 import com.yoho.message.sdk.common.model.SendMessageRspBo;
5 import com.yoho.message.sdk.service.ufo.IUFOSendService; 6 import com.yoho.message.sdk.service.ufo.IUFOSendService;
6 import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum; 7 import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum;
  8 +import com.yohobuy.ufo.model.order.common.OrderAttributes;
7 import com.yohobuy.ufo.model.order.constants.SkupType; 9 import com.yohobuy.ufo.model.order.constants.SkupType;
8 import com.yohoufo.dal.order.model.BuyerOrder; 10 import com.yohoufo.dal.order.model.BuyerOrder;
9 import com.yohoufo.dal.order.model.SellerOrderGoods; 11 import com.yohoufo.dal.order.model.SellerOrderGoods;
@@ -11,6 +13,7 @@ import com.yohoufo.dal.product.ProductMapper; @@ -11,6 +13,7 @@ import com.yohoufo.dal.product.ProductMapper;
11 import com.yohoufo.dal.product.model.Product; 13 import com.yohoufo.dal.product.model.Product;
12 import com.yohoufo.inboxclient.model.InBoxResponse; 14 import com.yohoufo.inboxclient.model.InBoxResponse;
13 import com.yohoufo.inboxclient.model.InboxReqVO; 15 import com.yohoufo.inboxclient.model.InboxReqVO;
  16 +import com.yohoufo.order.utils.BuyerOrderUtils;
14 import com.yohoufo.order.utils.SellerGoodsHelper; 17 import com.yohoufo.order.utils.SellerGoodsHelper;
15 import lombok.NonNull; 18 import lombok.NonNull;
16 import lombok.extern.slf4j.Slf4j; 19 import lombok.extern.slf4j.Slf4j;
@@ -21,6 +24,7 @@ import org.springframework.stereotype.Service; @@ -21,6 +24,7 @@ import org.springframework.stereotype.Service;
21 24
22 import java.util.Arrays; 25 import java.util.Arrays;
23 import java.util.List; 26 import java.util.List;
  27 +import java.util.Objects;
24 import java.util.Optional; 28 import java.util.Optional;
25 import java.util.function.Function; 29 import java.util.function.Function;
26 import java.util.function.Supplier; 30 import java.util.function.Supplier;
@@ -430,7 +434,16 @@ public class BuyerNoticeFacade extends BaseNoticeFacade { @@ -430,7 +434,16 @@ public class BuyerNoticeFacade extends BaseNoticeFacade {
430 } 434 }
431 435
432 private String buildGoodsTypeTagForBuyer(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods) { 436 private String buildGoodsTypeTagForBuyer(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods) {
433 - return SellerGoodsHelper.buildBuyerOrderGoodsTypeTag(buyerOrder.getAttributes(), SkupType.getSkupType(sellerOrderGoods.getAttributes())); 437 + SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes());
  438 + boolean isDepositOrder = BuyerOrderUtils.isDeposit(buyerOrder);
  439 + boolean isQuickDeliverGoods = SkupType.QUICK_DELIVER.equals(skupType);
  440 + if (isQuickDeliverGoods && isDepositOrder) {
  441 + return SkupType.QUICK_DELIVER.attrName() + SkupType.DEPOSIT.attrName();
  442 + } else if (isDepositOrder) {
  443 + return SkupType.DEPOSIT.attrName();
  444 + } else {
  445 + return skupType.attrName();
  446 + }
434 } 447 }
435 448
436 } 449 }