Browse Source

会员升级

Kirin 7 months ago
parent
commit
7f220db7cf
1 changed files with 4 additions and 2 deletions
  1. 4 2
      app/dao/product/product/StoreProductDao.php

+ 4 - 2
app/dao/product/product/StoreProductDao.php

@@ -245,8 +245,10 @@ class StoreProductDao extends BaseDao
                 $query->where('price', $where['use_min_price'][0] ?? '=', $where['use_min_price'][1] ?? 0);
             }
         })->when(isset($where['award']) && $where['award'] >= 0, function ($query) use ($where) {
-            if ($where['award']) $query->where('award_price', '>', 0);
-            if (!$where['award']) $query->where('award_price', 0);
+            if ($where['award'])
+                $query->where('award_price', '>', 0);
+            else
+                $query->where('award_price', 0);
         })->when(!$page && $limit, function ($query) use ($limit) {
             $query->limit($limit);
         })->field($field)->select()->toArray();