Exemple #1
0
 /**
  *获取用户列表
  */
 public function getList($page)
 {
     $Q = new Query('user');
     $Q->page = $page;
     $Q->pagesize = 5;
     $data = $Q->find();
     $pageBar = $Q->getPageBar();
     return array('data' => $data, 'bar' => $pageBar);
 }
Exemple #2
0
 /**
  * 获取申请认证用户列表
  * @param string $type 认证类型
  * @param int $page 页码
  */
 public function certApplyList($type, $page)
 {
     if (!isset($type)) {
         return array();
     }
     $table = '';
     switch ($type) {
         case 'deal':
             $table = 'dealer';
             break;
     }
     $Q = new Query('user as u');
     $Q->join = 'left join ' . $table . ' as c on u.id = c.user_id';
     $Q->fields = 'u.id,u.type,u.username,u.mobile,u.email,u.status as user_status,u.create_time,c.status ,c.apply_time';
     $Q->page = $page;
     $Q->where = 'c.status=' . self::CERT_APPLY;
     $data = $Q->find();
     $pageBar = $Q->getPageBar();
     return array('data' => $data, 'bar' => $pageBar);
 }
Exemple #3
0
 /**
  * 获取企业用户信息
  */
 public function getCompanyInfo($user_id)
 {
     $m = new Query('user as u');
     $m->join = 'left join company_info as p on u.id = p.user_id';
     $m->where = 'u.id=' . $user_id . ' and u.type=1';
     $res = $m->getObj();
     return $res;
 }