Jelajahi Sumber

活动库存判断优化

wufeng 2 tahun lalu
induk
melakukan
31579120ca
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      app/admin/controller/Activity.php

+ 1 - 1
app/admin/controller/Activity.php

@@ -288,7 +288,7 @@ class Activity extends Base
                                 ->where(['spuCode' => $good['spuCode'], 'is_del' => 0])
                                 ->sum('usable_stock');
 
-                            if ($value['activity_stock'] < $usable_stock) throw new \Exception($lemp['good_name'] . '的库存只有' . $usable_stock);
+                            if ($value['activity_stock'] > $usable_stock) throw new \Exception($lemp['good_name'] . '的库存只有' . $usable_stock);
                         }
 
                     }