Bläddra i källkod

更新物流查询

更新物流查询
Yangzw 7 månader sedan
förälder
incheckning
9d4b18fd81

+ 3 - 2
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/framework/delivery/core/client/impl/kd100/Kd100ExpressClient.java

@@ -86,7 +86,7 @@ public class Kd100ExpressClient implements ExpressClient {
 
         //如果状态为已签收("3"),则保存到订单信息中
         if(respDTO.getState().equals(TradeOrderStateEnum.RECEIVED.getState())){
-            updateOrder(respDTO.getExpressCompanyCode(),respDTO.getLogisticsNo(),expressTrackRespDTOS.get(0).getTime());
+            updateOrder(respDTO.getExpressCompanyCode(),respDTO.getLogisticsNo(),expressTrackRespDTOS.get(0).getTime(),reqDTO.getOrderId());
         }
         return expressTrackRespDTOS;
     }
@@ -96,9 +96,10 @@ public class Kd100ExpressClient implements ExpressClient {
      * @param com 快递公司编码
      * @param nu 单号
      */
-    private void updateOrder(String com, String nu, LocalDateTime time){
+    private void updateOrder(String com, String nu, LocalDateTime time, Long orderId) {
         DeliveryExpressDO deliveryExpressDO = deliveryExpressMapper.selectByCode(com);
         TradeOrderDO tradeOrderDO = tradeOrderMapper.selectOne(new LambdaQueryWrapper<TradeOrderDO>()
+                .eq(TradeOrderDO::getId, orderId)
                 .eq(TradeOrderDO::getLogisticsNo, nu)
                 .eq(TradeOrderDO::getLogisticsId, deliveryExpressDO.getId())
                 .isNull(TradeOrderDO::getReceivingTime)