Commit d5594252 authored by zhuwei's avatar zhuwei

一次愉快的搬家

parent 055a66a6
...@@ -617,7 +617,7 @@ class Houses extends Basic ...@@ -617,7 +617,7 @@ class Houses extends Basic
$field = 'id,name,remark,create_time'; $field = 'id,name,remark,create_time';
$params['houses_id'] = $this->params['houses_id']; $params['houses_id'] = $this->params['houses_id'];
$params['type'] = 2; $params['type'] = 2;
$agents = new AAgents(); $agents = new GOperatingRecords();
$this->data = $agents->getRecords($pageNo, $pageSize, 'id DESC', $field, $params); $this->data = $agents->getRecords($pageNo, $pageSize, 'id DESC', $field, $params);
} else { } else {
$this->code = 101; $this->code = 101;
......
...@@ -144,30 +144,7 @@ class AAgents extends BaseModel ...@@ -144,30 +144,7 @@ class AAgents extends BaseModel
->where($params)->count(); ->where($params)->count();
} }
/**
* 操作盘方记录
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getRecords($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '')
{
$data = Db::table('g_operating_records')
->field($field)
->where($params)
->limit($pageSize)
->order($order_)
->page($pageNo)
->select();
return $data;
}
/** /**
* @param $field * @param $field
......
...@@ -72,4 +72,26 @@ class GOperatingRecords extends BaseModel ...@@ -72,4 +72,26 @@ class GOperatingRecords extends BaseModel
} }
return $data; return $data;
} }
/**
* 操作盘方记录
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
*/
public function getRecords($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '')
{
$data = $this
->field($field)
->where($params)
->limit($pageSize)
->order($order_)
->page($pageNo)
->select();
return $data;
}
} }
\ 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