|
@@ -2182,12 +2182,14 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
{
|
|
|
$where = [];
|
|
|
if(isset($data['sector_id']) && !empty($data['sector_id'])){
|
|
|
- $where['sector_id'] = $data['sector_id'];
|
|
|
+ $where['component.sector_id'] = $data['sector_id'];
|
|
|
}
|
|
|
if(isset($data['sort_id']) && !empty($data['sort_id'])){
|
|
|
- $where['sort_id'] = $data['sort_id'];
|
|
|
+ $where['component.sort_id'] = $data['sort_id'];
|
|
|
}
|
|
|
- $component = Component::where($where)->get()->all();
|
|
|
+ $component = Component::where($where)->leftJoin('size','component.size_id','=','size.id')
|
|
|
+ ->select('component.*','size.width','size.height')
|
|
|
+ ->get()->all();
|
|
|
if(empty($component)){
|
|
|
return Result::error('组件不存在!');
|
|
|
}
|
|
@@ -2205,7 +2207,10 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
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();
|
|
|
+ $sector = Sector::where($where)->where('status','!=',0)
|
|
|
+ ->leftJoin('size','sector.size_id','=','size.id')
|
|
|
+ ->select('sector.*','size.width','size.height')
|
|
|
+ ->get()->all();
|
|
|
if(empty($sector)){
|
|
|
return Result::error('通栏不存在!');
|
|
|
}
|