Commit f6538615 authored by hujun's avatar hujun

盘方操作记录

parent d4ba55df
...@@ -139,4 +139,25 @@ class OfficeRoom extends Basic ...@@ -139,4 +139,25 @@ class OfficeRoom extends Basic
} }
return $this->response($code, $msg, $data); return $this->response($code, $msg, $data);
} }
/**
* 操作记录
*
* @return \think\Response
*/
public function getRecords()
{
$data = [];
$this->params['type'] = 1;
$result = $this->service->getRecords($this->params);
if ($result['status'] == 'successful') {
$data = $result['data'];
$code = 200;
$msg = '';
} else {
$code = 101;
$msg = $result['msg'];
}
return $this->response($code, $msg, $data);
}
} }
\ No newline at end of file
...@@ -1021,5 +1021,35 @@ class OfficeRoomService ...@@ -1021,5 +1021,35 @@ class OfficeRoomService
return $where; return $where;
} }
/**
* 操作记录
*
* @param $params
* @return mixed
*/
public function getRecords($params)
{
$result['status'] = 'fail';
$result['msg'] = '';
if (empty($params['houses_id'])) {
$result['msg'] = '参数错误';
}
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$field = 'id,name,remark,create_time';
$where['house_id'] = $params['houses_id'];
if (isset($params['type'])) {
$where['type'] = $params['type'];
}
try {
$agents = new OfficeGOperatingRecord();
$result['data'] = $agents->getList($pageNo, $pageSize, 'id DESC', $field, $where);
$result['status'] = 'successful';
} catch (\Exception $e) {
$result['msg'] = $e->getMessage();
}
return $result;
}
} }
\ No newline at end of file
...@@ -1000,6 +1000,7 @@ Route::group('office_index', [ ...@@ -1000,6 +1000,7 @@ Route::group('office_index', [
'getLabelsList' => ['index/OfficeLabel/getLabelsList', ['method' => 'get']], //楼盘标签列表 'getLabelsList' => ['index/OfficeLabel/getLabelsList', ['method' => 'get']], //楼盘标签列表
'houseEdit' => ['index/OfficeRoom/edit', ['method' => 'POST|GET']],//楼盘字典新增和编辑 'houseEdit' => ['index/OfficeRoom/edit', ['method' => 'POST|GET']],//楼盘字典新增和编辑
'houseAdd' => ['index/OfficeRoom/edit', ['method' => 'POST|GET']],//楼盘字典新增和编辑 'houseAdd' => ['index/OfficeRoom/edit', ['method' => 'POST|GET']],//楼盘字典新增和编辑
'getRecords' => ['index/OfficeRoom/getRecords', ['method' => 'GET']],//盘方操作记录
]); ]);
......
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