Authored by LUOXC

隐藏闪购订单中卖家发往平台的物流

@@ -52,7 +52,6 @@ import java.util.concurrent.TimeUnit; @@ -52,7 +52,6 @@ import java.util.concurrent.TimeUnit;
52 52
53 import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.judge_pass; 53 import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.judge_pass;
54 import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.platform_receive; 54 import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.platform_receive;
55 -import static com.yohobuy.ufo.model.order.common.EnumExpressDataType.operate_transfer;  
56 import static com.yohobuy.ufo.model.order.common.EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER; 55 import static com.yohobuy.ufo.model.order.common.EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
57 56
58 @Service 57 @Service
@@ -257,13 +256,13 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -257,13 +256,13 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
257 Integer skup = sellerOrderGoods.getId(); 256 Integer skup = sellerOrderGoods.getId();
258 try { 257 try {
259 // 插入物流调拨信息 258 // 插入物流调拨信息
260 - expressInfoService.saveOperateTransfer(OperateTransferExpressInfo.builder() 259 + expressInfoService.saveOperateTransferExpressInfo(OperateTransferExpressInfo.builder()
261 .uid(buyerUid) 260 .uid(buyerUid)
262 .orderCode(orderCode) 261 .orderCode(orderCode)
263 .expressType(EXPRESS_TYPE_JUDGE_CENTER) 262 .expressType(EXPRESS_TYPE_JUDGE_CENTER)
264 .operateTransferCode(platform_receive) 263 .operateTransferCode(platform_receive)
265 .build()); 264 .build());
266 - expressInfoService.saveOperateTransfer(OperateTransferExpressInfo.builder() 265 + expressInfoService.saveOperateTransferExpressInfo(OperateTransferExpressInfo.builder()
267 .uid(buyerUid) 266 .uid(buyerUid)
268 .orderCode(orderCode) 267 .orderCode(orderCode)
269 .expressType(EXPRESS_TYPE_JUDGE_CENTER) 268 .expressType(EXPRESS_TYPE_JUDGE_CENTER)
@@ -28,14 +28,14 @@ public interface IExpressInfoService { @@ -28,14 +28,14 @@ public interface IExpressInfoService {
28 * 保存调拨数据 28 * 保存调拨数据
29 * @param request 调拨数据 29 * @param request 调拨数据
30 */ 30 */
31 - void saveOperateTransfer(OperateTransferExpressInfo request); 31 + void saveOperateTransferExpressInfo(OperateTransferExpressInfo request);
32 32
33 /** 33 /**
34 * 保存调拨数据 34 * 保存调拨数据
35 * @param condition 条件 35 * @param condition 条件
36 * @param request 调拨数据 36 * @param request 调拨数据
37 */ 37 */
38 - void saveOperateTransferIf(boolean condition, OperateTransferExpressInfo request); 38 + void saveOperateTransferExpressInfoIf(boolean condition, OperateTransferExpressInfo request);
39 39
40 40
41 void triggerExpressMQ(Integer uid,Integer expressCompanyId,Long orderCode,String wayBillCode,String mobile ); 41 void triggerExpressMQ(Integer uid,Integer expressCompanyId,Long orderCode,String wayBillCode,String mobile );
@@ -54,9 +54,6 @@ import org.springframework.stereotype.Service; @@ -54,9 +54,6 @@ import org.springframework.stereotype.Service;
54 import java.util.*; 54 import java.util.*;
55 import java.util.stream.Collectors; 55 import java.util.stream.Collectors;
56 56
57 -import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.platform_receive;  
58 -import static com.yohobuy.ufo.model.order.common.EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;  
59 -  
60 @Service 57 @Service
61 public class BuyerOrderServiceImpl implements IBuyerOrderService { 58 public class BuyerOrderServiceImpl implements IBuyerOrderService {
62 59
@@ -107,7 +104,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { @@ -107,7 +104,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
107 104
108 @Autowired 105 @Autowired
109 private OrderChangeListenerContainer orderChangeListenerContainer; 106 private OrderChangeListenerContainer orderChangeListenerContainer;
110 - 107 +
111 /** 108 /**
112 * 提交订单 109 * 提交订单
113 * @param orderRequest 110 * @param orderRequest
@@ -133,7 +130,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { @@ -133,7 +130,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
133 BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(uid, orderCode); 130 BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(uid, orderCode);
134 SellerOrderGoods sog = sellerOrderGoodsMapper.selectByPrimaryKey(bog.getSkup()); 131 SellerOrderGoods sog = sellerOrderGoodsMapper.selectByPrimaryKey(bog.getSkup());
135 132
136 - expressInfoService.saveOperateTransferIf(BuyerOrderUtils.isDeposit(buyerOrder), 133 + expressInfoService.saveOperateTransferExpressInfoIf(BuyerOrderUtils.isDeposit(buyerOrder),
137 OperateTransferExpressInfo.builder() 134 OperateTransferExpressInfo.builder()
138 .uid(uid) 135 .uid(uid)
139 .orderCode(orderCode) 136 .orderCode(orderCode)
@@ -42,6 +42,7 @@ import com.yohoufo.order.service.proxy.ProductProxyService; @@ -42,6 +42,7 @@ import com.yohoufo.order.service.proxy.ProductProxyService;
42 import com.yohoufo.order.service.proxy.UserProxyService; 42 import com.yohoufo.order.service.proxy.UserProxyService;
43 import com.yohoufo.order.service.seller.setting.SellerService; 43 import com.yohoufo.order.service.seller.setting.SellerService;
44 import com.yohoufo.order.service.seller.setting.SellerWrapper; 44 import com.yohoufo.order.service.seller.setting.SellerWrapper;
  45 +import com.yohoufo.order.utils.BuyerOrderUtils;
45 import org.apache.commons.collections.CollectionUtils; 46 import org.apache.commons.collections.CollectionUtils;
46 import org.apache.commons.lang3.StringUtils; 47 import org.apache.commons.lang3.StringUtils;
47 import org.slf4j.Logger; 48 import org.slf4j.Logger;
@@ -325,7 +326,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { @@ -325,7 +326,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
325 } 326 }
326 327
327 @Override 328 @Override
328 - public void saveOperateTransfer(OperateTransferExpressInfo request) { 329 + public void saveOperateTransferExpressInfo(OperateTransferExpressInfo request) {
329 try { 330 try {
330 saveOperateTransferExpressInfo(request.getUid(), 23, request.getOrderCode(), "", 331 saveOperateTransferExpressInfo(request.getUid(), 23, request.getOrderCode(), "",
331 request.getExpressType().getCode(), EnumExpressDataType.operate_transfer, request.getOperateTransferCode()); 332 request.getExpressType().getCode(), EnumExpressDataType.operate_transfer, request.getOperateTransferCode());
@@ -335,9 +336,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { @@ -335,9 +336,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
335 } 336 }
336 337
337 @Override 338 @Override
338 - public void saveOperateTransferIf(boolean condition, OperateTransferExpressInfo operateTransferExpressInfo) { 339 + public void saveOperateTransferExpressInfoIf(boolean condition, OperateTransferExpressInfo operateTransferExpressInfo) {
339 if (condition) { 340 if (condition) {
340 - saveOperateTransfer(operateTransferExpressInfo); 341 + saveOperateTransferExpressInfo(operateTransferExpressInfo);
341 } 342 }
342 } 343 }
343 344
@@ -499,6 +500,12 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { @@ -499,6 +500,12 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
499 expressInfoRespBo.setExpressType(EnumExpressType.EXPRESS_TYPE_1.getCode().byteValue()); 500 expressInfoRespBo.setExpressType(EnumExpressType.EXPRESS_TYPE_1.getCode().byteValue());
500 } 501 }
501 502
  503 + // 隐藏闪购订单中卖家发往平台的物流
  504 + if (BuyerOrderUtils.isQuickDeliver(buyerOrder)) {
  505 + expressInfoRespBo.setSupplementExpressInfoDetailTitle("");
  506 + expressInfoRespBo.setSupplementExpressInfoDetailList(Collections.emptyList());
  507 + }
  508 +
502 LOGGER.info("queryExpressDetailInfo result = {}", JSON.toJSONString(expressInfoRespBo)); 509 LOGGER.info("queryExpressDetailInfo result = {}", JSON.toJSONString(expressInfoRespBo));
503 return expressInfoRespBo; 510 return expressInfoRespBo;
504 } 511 }
@@ -66,6 +66,10 @@ public class BuyerOrderUtils { @@ -66,6 +66,10 @@ public class BuyerOrderUtils {
66 return Objects.nonNull(orderAttrCode) && Objects.equals(OrderAttributes.QUICK_DELIVER.getCode(), orderAttrCode); 66 return Objects.nonNull(orderAttrCode) && Objects.equals(OrderAttributes.QUICK_DELIVER.getCode(), orderAttrCode);
67 } 67 }
68 68
  69 + public static boolean isQuickDeliver(BuyerOrder buyerOrder){
  70 + return isQuickDeliver(buyerOrder.getAttributes());
  71 + }
  72 +
69 73
70 public static SkupType convertSkupTypeIfNeed(Integer orderAttrCode, SkupType skupType){ 74 public static SkupType convertSkupTypeIfNeed(Integer orderAttrCode, SkupType skupType){
71 boolean isDeposit = isDeposit(orderAttrCode); 75 boolean isDeposit = isDeposit(orderAttrCode);