table}"; $count = $UserModel->query($sql); $sql = "select * from {$UserModel->table} order by id desc limit {$offset},{$limit} "; $data = $UserModel->query($sql); $return['code'] = 0; $return['count'] = count($count); $return['data'] = $data; $return['msg'] = "成功"; echo json_encode($return);die; } public function usersetAction() { } public function usersetlistAction(){ $UserModel = new UserModel(); $p = $_REQUEST; $page = $p['page']; $limit = $p['limit']; $offset = ($page-1)*$limit; $sql = "select * from {$UserModel->table}"; $count = $UserModel->query($sql); $sql = "select * from {$UserModel->table} order by id desc limit {$offset},{$limit} "; $data = $UserModel->query($sql); $CageSetModel = new CageSetModel(); $SquirrelSetModel = new SquirrelSetModel(); $ExcelSetModel = new ExcelSetModel(); foreach($data as $key => &$val){ $params['user_id'] = $val['id']; //笼位设置 $val['cageSet'] = empty($CageSetModel->getsetinfo($params))?1:0; //鼠设置 $val['squirrelSet'] = empty($SquirrelSetModel->getsetinfo($params))?1:0; //excel导出设置 $val['excelSet'] = empty($ExcelSetModel->getsetinfo($params))?1:0; } $return['code'] = 0; $return['count'] = count($count); $return['data'] = $data; $return['msg'] = "成功"; echo json_encode($return);die; } public function remindAction(){ } public function remindlistAction(){ } }