Răsfoiți Sursa

过滤孪生站

rkljw 2 zile în urmă
părinte
comite
955b270528
1 a modificat fișierele cu 9 adăugiri și 0 ștergeri
  1. 9 0
      app/JsonRpc/WebsiteService.php

+ 9 - 0
app/JsonRpc/WebsiteService.php

@@ -943,6 +943,15 @@ class WebsiteService implements WebsiteServiceInterface
             array_push($where, ['website.website_name', 'like', '%' . $data['keyword'] . '%']);
             array_push($where, ['website.website_name', 'like', '%' . $data['keyword'] . '%']);
         }
         }
         $result = Website::where($where)->get();
         $result = Website::where($where)->get();
+
+        if (isset($data['website_column_id'])) {
+            $target = $data['website_column_id'];
+            $result = $result->filter(function ($item) use ($target) {
+                $arr = json_decode($item->website_column_arr_id, true);
+                return !in_array($target, $arr);
+            });
+        }
+
         if ($result) {
         if ($result) {
             return Result::success($result);
             return Result::success($result);
         } else {
         } else {