first commit
This commit is contained in:
36
pgserver/application/admin/controller/Estate.php
Normal file
36
pgserver/application/admin/controller/Estate.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\model\Estate as EstateModel;
|
||||
|
||||
class Estate extends Base
|
||||
{
|
||||
|
||||
/**
|
||||
* 价格查询
|
||||
*
|
||||
* @return \think\Response
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$userId = $this->userId;
|
||||
$data = $this->request->get();
|
||||
$estateModel = new EstateModel();
|
||||
$map = [];
|
||||
if (isset($data['property_full_name']) && !empty($data['property_full_name'])){
|
||||
$map[] = ['property_full_name','like',$data['property_full_name'].'%'];
|
||||
}
|
||||
$estates = $estateModel
|
||||
->where($map)
|
||||
->field([
|
||||
'id','property_full_name','building_name','building_name','floor_no','house_name',
|
||||
'city','area','type','size','remark',
|
||||
'per_price','eva_total_value','clear_price','create_time'
|
||||
])
|
||||
->paginate();
|
||||
return $this->buildSuccess($estates);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user