Bläddra i källkod

新客取消可继续购买

gorden 1 vecka sedan
förälder
incheckning
fe75a11466
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      app/admin/controller/order/NewCustomerController.php

+ 2 - 2
app/admin/controller/order/NewCustomerController.php

@@ -629,7 +629,7 @@ class NewCustomerController extends Curd
                 'order_express_json' => $params['order_express_json'] ?? '[]',
                 'order_extend_json' => $params['order_extend_json'] ? json_encode($params['order_extend_json']) : '[]',
                 'order_addtimes' => time(),
-                'order_add_user_id'=>JwtToken::getCurrentId()
+                'order_add_user_id' => JwtToken::getCurrentId()
             ];
 
             Order::insert($data);
@@ -1228,7 +1228,7 @@ class NewCustomerController extends Curd
                 }
                 // 不允许重复购买
                 if (isset($goodsAttributeJson['control']) && $goodsAttributeJson['control']['if_repeat_buy'] == 'N') {
-                    if (Order::where('join_order_member_id', $params['join_order_member_id'])->where('order_classify', 'COMBINE')->exists()) {
+                    if (Order::where('join_order_member_id', $params['join_order_member_id'])->where('order_classify', 'COMBINE') > where('order_status_system', '<>', 'CANCEL')->exists()) {
                         throw new BusinessException('仅可购买一次');
                     }
                 }