Browse Source

活动库存判断优化

wufeng 2 years ago
parent
commit
31579120ca
1 changed files with 1 additions and 1 deletions
  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);
                         }
 
                     }