Commit 30143f6a authored by zfc's avatar zfc Committed by zw

test数据库端口修改,角色列表正序排列

parent 2062f09d
...@@ -24,7 +24,7 @@ return [ ...@@ -24,7 +24,7 @@ return [
'password' => 'Fujuhaofang123022818root', 'password' => 'Fujuhaofang123022818root',
// 'password' => '123456', // 'password' => '123456',
// 端口 // 端口
'hostport' => '3307', 'hostport' => '3308',
// 'hostport' => '', // 'hostport' => '',
// 连接dsn // 连接dsn
'dsn' => '', 'dsn' => '',
......
...@@ -55,7 +55,7 @@ class Agent extends Basic ...@@ -55,7 +55,7 @@ class Agent extends Basic
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function AgentList(){ public function AgentList(){
$table= new Agents(); $table= new AAgents();
$data['status'] = 200; $data['status'] = 200;
$data['msg'] = ''; $data['msg'] = '';
//获取当前模块可操作按钮start******************************** //获取当前模块可操作按钮start********************************
......
...@@ -68,7 +68,7 @@ class Auth extends Basic ...@@ -68,7 +68,7 @@ class Auth extends Basic
$data['search']=$search; $data['search']=$search;
} }
$data['list'] = $auth_group->getList($pageNo, $pageSize, 'id desc','*', $where); $data['list'] = $auth_group->getList($pageNo, $pageSize, 'id asc','*', $where);
$data['total'] = $auth_group->getTotal($where); $data['total'] = $auth_group->getTotal($where);
return $this->response(200, '', $data); return $this->response(200, '', $data);
} }
......
...@@ -49,6 +49,51 @@ class Agents extends Model ...@@ -49,6 +49,51 @@ class Agents extends Model
return $data; return $data;
} }
/**
* 记录总数
*
* @param $params
* @return int|string
*/
public function getTotal2($join,$params)
{
return $this->alias('a')
->join($join)
->where($params)->count();
}
/**分页列表
* @param int $p
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $join
* @param string $where
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getListJoin($p = 1, $pageSize = 15, $order_ = 'id desc', $field = '',$join='', $where = '')
{
$data = $this->field($field)
->alias('a')
->join($join)
->where($where)
->order($order_)
->limit($pageSize)
->page($p)
->select();
//echo $this->getLastSql();
return $data;
}
/** /**
* 经纪人详情 * 经纪人详情
* @param $id * @param $id
......
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