Authored by LUOXC

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

... ... @@ -52,7 +52,6 @@ import java.util.concurrent.TimeUnit;
import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.judge_pass;
import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.platform_receive;
import static com.yohobuy.ufo.model.order.common.EnumExpressDataType.operate_transfer;
import static com.yohobuy.ufo.model.order.common.EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
@Service
... ... @@ -257,13 +256,13 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
Integer skup = sellerOrderGoods.getId();
try {
// 插入物流调拨信息
expressInfoService.saveOperateTransfer(OperateTransferExpressInfo.builder()
expressInfoService.saveOperateTransferExpressInfo(OperateTransferExpressInfo.builder()
.uid(buyerUid)
.orderCode(orderCode)
.expressType(EXPRESS_TYPE_JUDGE_CENTER)
.operateTransferCode(platform_receive)
.build());
expressInfoService.saveOperateTransfer(OperateTransferExpressInfo.builder()
expressInfoService.saveOperateTransferExpressInfo(OperateTransferExpressInfo.builder()
.uid(buyerUid)
.orderCode(orderCode)
.expressType(EXPRESS_TYPE_JUDGE_CENTER)
... ...
... ... @@ -28,14 +28,14 @@ public interface IExpressInfoService {
* 保存调拨数据
* @param request 调拨数据
*/
void saveOperateTransfer(OperateTransferExpressInfo request);
void saveOperateTransferExpressInfo(OperateTransferExpressInfo request);
/**
* 保存调拨数据
* @param condition 条件
* @param request 调拨数据
*/
void saveOperateTransferIf(boolean condition, OperateTransferExpressInfo request);
void saveOperateTransferExpressInfoIf(boolean condition, OperateTransferExpressInfo request);
void triggerExpressMQ(Integer uid,Integer expressCompanyId,Long orderCode,String wayBillCode,String mobile );
... ...
... ... @@ -54,9 +54,6 @@ import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.platform_receive;
import static com.yohobuy.ufo.model.order.common.EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
@Service
public class BuyerOrderServiceImpl implements IBuyerOrderService {
... ... @@ -107,7 +104,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
@Autowired
private OrderChangeListenerContainer orderChangeListenerContainer;
/**
* 提交订单
* @param orderRequest
... ... @@ -133,7 +130,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(uid, orderCode);
SellerOrderGoods sog = sellerOrderGoodsMapper.selectByPrimaryKey(bog.getSkup());
expressInfoService.saveOperateTransferIf(BuyerOrderUtils.isDeposit(buyerOrder),
expressInfoService.saveOperateTransferExpressInfoIf(BuyerOrderUtils.isDeposit(buyerOrder),
OperateTransferExpressInfo.builder()
.uid(uid)
.orderCode(orderCode)
... ...
... ... @@ -42,6 +42,7 @@ import com.yohoufo.order.service.proxy.ProductProxyService;
import com.yohoufo.order.service.proxy.UserProxyService;
import com.yohoufo.order.service.seller.setting.SellerService;
import com.yohoufo.order.service.seller.setting.SellerWrapper;
import com.yohoufo.order.utils.BuyerOrderUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
... ... @@ -325,7 +326,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
}
@Override
public void saveOperateTransfer(OperateTransferExpressInfo request) {
public void saveOperateTransferExpressInfo(OperateTransferExpressInfo request) {
try {
saveOperateTransferExpressInfo(request.getUid(), 23, request.getOrderCode(), "",
request.getExpressType().getCode(), EnumExpressDataType.operate_transfer, request.getOperateTransferCode());
... ... @@ -335,9 +336,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
}
@Override
public void saveOperateTransferIf(boolean condition, OperateTransferExpressInfo operateTransferExpressInfo) {
public void saveOperateTransferExpressInfoIf(boolean condition, OperateTransferExpressInfo operateTransferExpressInfo) {
if (condition) {
saveOperateTransfer(operateTransferExpressInfo);
saveOperateTransferExpressInfo(operateTransferExpressInfo);
}
}
... ... @@ -499,6 +500,12 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
expressInfoRespBo.setExpressType(EnumExpressType.EXPRESS_TYPE_1.getCode().byteValue());
}
// 隐藏闪购订单中卖家发往平台的物流
if (BuyerOrderUtils.isQuickDeliver(buyerOrder)) {
expressInfoRespBo.setSupplementExpressInfoDetailTitle("");
expressInfoRespBo.setSupplementExpressInfoDetailList(Collections.emptyList());
}
LOGGER.info("queryExpressDetailInfo result = {}", JSON.toJSONString(expressInfoRespBo));
return expressInfoRespBo;
}
... ...
... ... @@ -66,6 +66,10 @@ public class BuyerOrderUtils {
return Objects.nonNull(orderAttrCode) && Objects.equals(OrderAttributes.QUICK_DELIVER.getCode(), orderAttrCode);
}
public static boolean isQuickDeliver(BuyerOrder buyerOrder){
return isQuickDeliver(buyerOrder.getAttributes());
}
public static SkupType convertSkupTypeIfNeed(Integer orderAttrCode, SkupType skupType){
boolean isDeposit = isDeposit(orderAttrCode);
... ...