Commit eda11ce2 authored by hujun's avatar hujun

price

parent 1c485758
...@@ -1244,7 +1244,7 @@ class OfficeRoomService ...@@ -1244,7 +1244,7 @@ class OfficeRoomService
$order = 'a.home_page_sort desc'; $order = 'a.home_page_sort desc';
} }
$field = 'a.id,b.disc,b.title,b.address,c.name as business_name,a.building_id'; $field = 'a.id,b.disc,b.title,b.address,c.name as business_name,a.building_id,a.price,a.price_total';
try { try {
$data = $this->m_office_room->getRoomBuilding($page_no, $page_size, $order, $field, $where); $data = $this->m_office_room->getRoomBuilding($page_no, $page_size, $order, $field, $where);
} catch (\Exception $e) { } catch (\Exception $e) {
...@@ -1256,10 +1256,8 @@ class OfficeRoomService ...@@ -1256,10 +1256,8 @@ class OfficeRoomService
$result_data = []; $result_data = [];
foreach ($data as $k=>$v) { foreach ($data as $k=>$v) {
$tmp['id'] = $v['id']; $tmp['id'] = $v['id'];
$tmp['price'] = $this->MinField($v['building_id'], 'price'); $tmp['price'] = empty($v['price']) ? 0:$v['price']/100;
$tmp['price'] = empty($tmp['price']) ? 0:$tmp['price']/100; $tmp['price_total'] = empty($v['price_total']) ? 0:$v['price_total']/100;
$tmp['price_total'] = $this->MinField($v['building_id'], 'price_total');
$tmp['price_total'] = empty($tmp['price_total']) ? 0:$tmp['price_total']/100;
$tmp['shop_sign'] = $this->getBuildingSign($v['building_id']); $tmp['shop_sign'] = $this->getBuildingSign($v['building_id']);
$area = $this->MinField($v['building_id'], 'area'); $area = $this->MinField($v['building_id'], 'area');
$tmp['title'] = $v['disc'].' '.$v['business_name']. ' '.$v['title']. ' '.$area.'㎡'; $tmp['title'] = $v['disc'].' '.$v['business_name']. ' '.$v['title']. ' '.$area.'㎡';
......
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