Commit 36c3d883 authored by hujun's avatar hujun

咨询案场

parent ddcb4c3e
......@@ -20,7 +20,7 @@ use app\model\OPushMessageModel;
* @time :11:15:05
* Intro :
*/
class Broker extends Basic
class OfficeBroker extends Basic
{
/**
......@@ -64,13 +64,13 @@ class Broker extends Basic
}
if (!empty($reception_id['reception_id'])) {
$report_agent = $agents->getUser(1, 1, '', $fields, [ 'a.id' => $reception_id['reception_id'], 'a.status'=>0,'c.is_del'=>0 ]);
$report_agent = $agents->getUserOffice(1, 1, '', $fields, [ 'a.id' => $reception_id['reception_id'], 'a.status'=>0,'c.is_del'=>0 ]);
}
$where['c.houses_id'] = $params['house_id'];
$where['c.house_id'] = $params['house_id'];
$where['c.is_del'] = 0;
$where['a.status'] = 0;
$list = $agents->getUser($pageNo, $pageSize, 'evaluate desc', $fields, $where);
$list = $agents->getUserOffice($pageNo, $pageSize, 'evaluate desc', $fields, $where);
$agent_id = [];
foreach ($list as $v) {
......
......@@ -541,7 +541,9 @@ class OfficeService
foreach ($data as $k=>$v) {
$tmp['id'] = $v['id'];
$tmp['price'] = $this->service_room->MinField($v['id'], 'price');
$tmp['price'] = empty($tmp['price']) ? 0:$tmp['price'];
$tmp['price_total'] = $this->service_room->MinField($v['id'], 'price_total');
$tmp['price_total'] = empty($tmp['price_total']) ? 0:$tmp['price_total'];
$tmp['shop_sign'] = $this->getBuildingSign($v['id']);
$area = $this->service_room->MinField($v['id'], 'area');
$tmp['title'] = $v['disc'].' '.$v['business_name']. ' '.$v['title']. ' '.$area.'㎡';
......
......@@ -1045,6 +1045,34 @@ class AAgents extends BaseModel
->select();
}
/**
* 查询经纪人
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param $field
* @param $params
* @param string $house_id
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getUserOffice($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field, $params, $house_id = '')
{
return $this->field($field)->alias('a')
->join('u_evaluate b', 'a.id = b.agents_id', 'left')
->join('office_g_room_to_agent c', 'a.id=c.agent_id', 'left')
->where('c.type', 1)
->where($params)
->group('a.id')
->order($order_)
->limit($pageSize)
->page($pageNo)
->select();
}
/**
* @param int $pageNo
* @param int $pageSize
......
......@@ -994,4 +994,9 @@ Route::group('office_index', [
'houseAdd' => ['index/OfficeRoom/edit', ['method' => 'POST|GET']],//楼盘字典新增和编辑
]);
Route::group('office_api', [
'getBroker' => ['api/OfficeBroker/index', ['method' => 'get']], //获取当前商铺或街铺的经纪人评论信息列表
'getBrokerV2' => ['api/OfficeBroker/indexV2', ['method' => 'get']], //获取当前商铺或街铺的经纪人评论信息列表
]);
//Route::miss('api/index/miss');//处理错误的url
\ No newline at end of file
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