Browse Source

物流查询优化返回信息

李学强 2 months ago
parent
commit
c9817a10bc

+ 3 - 0
lhb-basic/lhb-basic-biz/src/main/java/com/kxs/lhb/basic/biz/service/impl/LhbOrderServiceImpl.java

@@ -84,6 +84,9 @@ public class LhbOrderServiceImpl extends MPJBaseServiceImpl<LhbOrderMapper, LhbO
         }
         QueryOrderReq req = QueryOrderReq.builder().orderId(order.getOutOrderSn()).build();
         QueryLogisticsRes queryLogisticsRes = channelFactory.getChannel(order.getIfCode()).queryLogistics(req);
+        if(queryLogisticsRes == null){
+            throw new GlobalCustomerException("暂未查询到物流信息");
+        }
         if(StrUtil.isNotBlank(queryLogisticsRes.getExpressNo())){
             order.setExpressNo(queryLogisticsRes.getExpressNo());
             order.updateById();