Commit de616d38 authored by zhuwei's avatar zhuwei

1

parent a2b2c10b
......@@ -348,10 +348,35 @@ class OfficeService
//最大最小面积
$result['area_max'] = $this->getAreaMaxOrMin($id,'max');
$result['area_min'] = $this->getAreaMaxOrMin($id,'min');
//标签
$result['building_sign'] = $this->getBuildingSign($id);
return ['status'=>200,'msg'=>'success','data'=>$result];
}
/**
* 标签
* @param $id
* @return string
*/
private function getBuildingSign($id){
$m_office_room = new OfficeGRoom();
$field = 'shop_sign';
$where['building_id'] = $id;
$where['status'] = 1;
$res = $m_office_room->getRoom($field, $where);
if(!$res)
return '';
$shop_sign_old = '';
foreach ($res as $k=>$v) {
$shop_sign_old.=','.$v['shop_sign'];
}
$ex_shop_sign_old = explode(',', trim($shop_sign_old, ","));
$ex_shop_sign_old = array_unique($ex_shop_sign_old);//数组去重
$shop_sign = implode(",", $ex_shop_sign_old);
return $shop_sign;
}
/**
* 最大最小面积
* @param $id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment