26 lines
		
	
	
		
			651 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
			
		
		
	
	
			26 lines
		
	
	
		
			651 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
| <?php
 | |
| 
 | |
| namespace app\model;
 | |
| 
 | |
| class Member extends Base
 | |
| {
 | |
|     public const STATUS_NORMAL  = 1;//正常
 | |
|     public const STATUS_DISABLE = 0;//禁用
 | |
| 
 | |
|     public static function getList($limit = 40)
 | |
|     {
 | |
|         return self::alias('m')
 | |
|             ->leftjoin('auth_group g', 'g.id=m.group_id')
 | |
|             ->field('m.id,m.username,m.login_time,m.group_id,g.title')
 | |
|             ->order('m.id', 'asc')
 | |
|             ->paginate($limit);
 | |
|     }
 | |
| 
 | |
|     //根据用户名获取管理账号
 | |
|     public static function getByUserName($username)
 | |
|     {
 | |
|         return self::where('username', trim($username))
 | |
|             ->findOrEmpty()
 | |
|             ->toArray();
 | |
|     }
 | |
| } |