qmj 3 недель назад
Родитель
Сommit
bcc8cc95f8

+ 6 - 1
ruoyi-admin/src/main/java/com/ruoyi/app/order/UserOrderController.java

@@ -173,7 +173,12 @@ public class UserOrderController extends BaseController {
             posOrder.setPickUpTime(input.getPickUpTime());
             posOrder.setReservePhone(input.getReservePhone());
             // 新状态字段初始化
-            posOrder.setState(0L);
+            // 堂食订单(type=2)自动接单,跳过商家确认
+            if (item.getType() != null && item.getType() == 2) {
+                posOrder.setState(1L);
+            } else {
+                posOrder.setState(0L);
+            }
             posOrder.setAfterSaleStatus(0L);
             posOrder.setDeliveryStatus(null);
             // 外送到付(payType=1):payStatus=1;其他:payStatus=0