Răsfoiți Sursa

获取商品模块-level不对应问题解决

15313670163 3 zile în urmă
părinte
comite
bf07237d33
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      app/JsonRpc/NewsService.php

+ 2 - 2
app/JsonRpc/NewsService.php

@@ -1474,8 +1474,8 @@ class NewsService implements NewsServiceInterface
                     case 2: 
                     case 3: 
                         $goods = $query->where(function($q) use ($Levelid) { 
-                            $q->whereRaw("JSON_CONTAINS(good.level, '". intval($Levelid). "') = 0") 
-                              ->orWhereRaw("JSON_CONTAINS(good.level, '\"". intval($Levelid). "\"') = 0"); 
+                            $q->whereRaw("JSON_CONTAINS(good.level, '". intval($Levelid). "') = 1") 
+                              ->orWhereRaw("JSON_CONTAINS(good.level, '\"". intval($Levelid). "\"') = 1"); 
                         }); 
                         break; 
                     case 4: