|
@@ -2175,4 +2175,42 @@ 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'].'%']);
|
|
|
+ // $where['page_type'] = ['like','%'.$data['page_type'].'%'];
|
|
|
+ }
|
|
|
+ // return Result::success($where);
|
|
|
+ $sector = Sector::where($where)->get()->all();
|
|
|
+ if(empty($sector)){
|
|
|
+ return Result::error('通栏不存在!');
|
|
|
+ }
|
|
|
+ return Result::success($sector);
|
|
|
+ }
|
|
|
}
|