Parcourir la source

升级分期商品修改

kevin il y a 1 an
Parent
commit
fa0ce642c0
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      frontendApi/modules/v1/controllers/UserController.php

+ 2 - 2
frontendApi/modules/v1/controllers/UserController.php

@@ -393,11 +393,11 @@ class UserController extends BaseController {
 
         // 如果等级已经是顶级 && 没有分期订单,则不查询商品
         if ($stage == 100) {
-            $query_condition.= ") OR ((INSTALMENT = 0) OR (INSTALMENT = :INSTALMENT))";
+            $query_condition.= ") AND ((INSTALMENT = 0) OR (INSTALMENT = :INSTALMENT))";
         } else if ($stage == 1000) {
             $query_condition.= ") AND (INSTALMENT = :INSTALMENT)";
         } else {
-            $query_condition.= ") OR (INSTALMENT = :INSTALMENT)";
+            $query_condition.= ") OR (INSTALMENT <= :INSTALMENT)";
         }
 
         $allGoods = ShopGoods::find()->where("STATUS=1 AND CATEGORY_TYPE=1 " . $query_condition, [':INSTALMENT' => $stage])->orderBy('SORT ASC')->asArray()->all();