Commit 0ecf180c authored by hujun's avatar hujun

商铺修改日志

parent a2448f9c
......@@ -704,4 +704,26 @@ class Houses extends Basic
return $this->response(101, '锁盘失败!');
}
}
/**
* 商铺修改日志
*
* @return \think\Response
*/
public function getEditLog() {
if (empty($this->params['house_id'])) {
return $this->response(101, '参数错误');
}
$msg = '';
$house = new HouseService();
$data = $house->getEditLog($this->params['house_id']);
if ($data['status'] == 'successful') {
$code = 200;
} else {
$code = 101;
$msg = '获取数据失败'.$data['msg'];
}
return $this->response($code, $msg, $data['data']);
}
}
\ No newline at end of file
......@@ -287,4 +287,24 @@ class HouseService
return $result;
}
/**
* 商铺修改日志
*s
* @param $house_id
* @return mixed
*/
public function getEditLog($house_id) {
try {
$m_operating = new GOperatingRecords();
$result['data'] = $m_operating->getList(1, 1000, 'id DESC','agents_id,name,remark,create_time',['type'=>6, 'houses_id'=>$house_id]);
$result['status'] = 'successful';
} catch (\Exception $e) {
$result['status'] = 'fail';
$result['msg'] = $e->getMessage();
$result['data'] = [];
}
return $result;
}
}
\ No newline at end of file
......@@ -112,6 +112,7 @@ Route::group('index', [
'batchChangDish' => [ 'index/houses/batchChangDish', [ 'method' => 'post' ] ],//批量修改盘方
'transformLandlord' => [ 'index/houses/transformLandlord', [ 'method' => 'post' ] ],//转换房东手机号
'lockHouse' => [ 'index/houses/lockHouse', [ 'method' => 'post' ] ],//锁盘
'getEditLog' => [ 'index/houses/getEditLog', [ 'method' => 'get' ] ],//商铺修改日志
//版本管理
'version' => [ 'index/version/index', [ '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