Kirin 1 éve
szülő
commit
15c2128c90
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      app/services/order/StoreOrderCreateServices.php

+ 2 - 2
app/services/order/StoreOrderCreateServices.php

@@ -233,10 +233,10 @@ class StoreOrderCreateServices extends BaseServices
             'give_coupon' => implode(',', $promotions_give['give_coupon'] ?? []),
             'store_id' => $storeId
         ];
-        if ($orderInfo['total_price'] > sys_config('max_price', 0) && sys_config('max_price', 0) > 0) {
+        if ($orderInfo['award_price'] > sys_config('max_price', 0) && sys_config('max_price', 0) > 0 && $orderInfo['award_price'] > 0) {
             throw new ValidateException('下单金额不超过' . sys_config('max_price'));
         }
-        if ($orderInfo['total_price'] < sys_config('min_price', 0) && sys_config('min_price', 0) > 0) {
+        if ($orderInfo['award_price'] < sys_config('min_price', 0) && sys_config('min_price', 0) > 0 && $orderInfo['award_price'] > 0) {
             throw new ValidateException('下单金额不低于' . sys_config('min_price'));
         }
         $orderPre = $this->dao->search(['uid' => $uid, 'is_del' => 0, 'is_system_del' => 0])->order('add_time', 'desc')->find();