浏览代码

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

15313670163 3 天之前
父节点
当前提交
bf07237d33
共有 1 个文件被更改,包括 2 次插入2 次删除
  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: