瀏覽代碼

Merge branch '20250522_diywebfr'

15313670163 1 天之前
父節點
當前提交
f83e74b7a0
共有 2 個文件被更改,包括 41 次插入0 次删除
  1. 36 0
      app/JsonRpc/PublicRpcService.php
  2. 5 0
      app/JsonRpc/PublicRpcServiceInterface.php

+ 36 - 0
app/JsonRpc/PublicRpcService.php

@@ -2175,4 +2175,40 @@ class PublicRpcService implements PublicRpcServiceInterface
         }
         return Result::success($component_type);
     }
+    /**
+     * 组件管理-获取所有组件
+     */
+    public function getAllComponent(array $data): array
+    {
+        $where = [];
+        if(isset($data['sector_id']) && !empty($data['sector_id'])){
+            $where['sector_id'] = $data['sector_id'];
+        }
+        if(isset($data['sort_id']) && !empty($data['sort_id'])){
+            $where['sort_id'] = $data['sort_id'];
+        }
+        $component = Component::where($where)->get()->all();
+        if(empty($component)){
+            return Result::error('组件不存在!');
+        }
+        return Result::success($component);
+    }
+    /**
+     * 自助建站-流程管理-获取所有通栏
+     */
+    public function getAllSector(array $data): array
+    {
+        $where = [];
+         if(isset($data['template_id']) && !empty($data['template_id'])){
+            $where['template_id'] = $data['template_id'];
+        }
+        if(isset($data['page_type']) && !empty($data['page_type'])){
+            array_push($where,['page_type', 'like', '%'.$data['page_type'].'%']);
+        }
+        $sector = Sector::where($where)->where('status','!=',0)->get()->all();
+        if(empty($sector)){
+            return Result::error('通栏不存在!');
+        }
+        return Result::success($sector);
+    }
 }

+ 5 - 0
app/JsonRpc/PublicRpcServiceInterface.php

@@ -197,4 +197,9 @@ interface PublicRpcServiceInterface
     public function getAllSectorPlace(array $data): array;
     //组件管理-获取组件类型
     public function getComponentType(array $data): array;
+    //自助建站-流程管理-获取所有通栏
+    public function getAllSector(array $data): array;
+    //组件管理-获取所有组件
+    public function getAllComponent(array $data): array;
+
 }