moonsflyer 4 luni în urmă
părinte
comite
b378fad3b4
1 a modificat fișierele cu 7 adăugiri și 0 ștergeri
  1. 7 0
      app/openapi/logic/order/OrderLogic.php

+ 7 - 0
app/openapi/logic/order/OrderLogic.php

@@ -134,6 +134,13 @@ class OrderLogic extends BaseLogic
             self::setError('该订单号已存在');
             return false;
         }
+        if($params['pay_way'] == 1) {
+            if ($params['order_amount'] > $userInfo['user_money']) {
+                outFileLog($params, 'orderPush', '金额不足');
+                self::setError('线上会员金额不足以抵扣');
+                return false;
+            }
+        }
         $goods_price = 0;
         if(isset($params['goods_price']) && !empty($params['goods_price'])){
             $goods_price = $params['goods_price'];