Selaa lähdekoodia

fix: 强制结算后订单状态未更新,导致用户无法启动洗车机

forceSettleOrder 中 RRpc 关闭命令成功后直接 return,跳过了
settleOrder 调用,导致 orderStatus 和 payStatus 未更新。去掉
提前返回,统一走查询设备订单状态并结算的路径。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline 2 päivää sitten
vanhempi
säilyke
3a132f8900

+ 3 - 6
car-wash-service/src/main/java/com/kym/service/impl/WashOrderServiceImpl.java

@@ -201,13 +201,10 @@ public class WashOrderServiceImpl extends MyBaseServiceImpl<WashOrderMapper, Was
         }
 
         // 尝试通过 RRpc 发送关闭命令
-        boolean sent = sendCloseOrderWithRetry(order.getProductKey(), order.getDeviceName(), order.getOrderId(), 1);
-        if (sent) {
-            return;
-        }
+        sendCloseOrderWithRetry(order.getProductKey(), order.getDeviceName(), order.getOrderId(), 1);
 
-        // RRpc 失败,主动查询设备订单状态
-        log.warn("订单 {} 关闭命令发送失败,尝试主动查询设备状态", order.getOrderId());
+        // 查询设备订单状态进行结算
+        log.info("订单 {} 已发送关闭命令,查询设备订单状态进行结算", order.getOrderId());
         try {
             OrderInfo orderInfo = awoaraService.queryOrder(order.getProductKey(), order.getDeviceName(), order.getOrderId());
             if (orderInfo != null && orderInfo.getClose_type() != null && !orderInfo.getClose_type().isEmpty()) {