123456789101112131415161718 |
- <?php
- declare (strict_types = 1);
- namespace app\Admin\model;
- use think\Model;
- /**
- * @mixin \think\Model
- */
- class AdminAccount extends Model
- {
- public function GetUserById($accoutID){
- return $this->alias("a")->leftJoin("CFP_admin_account_relation b","a.id=b.account_id")->leftJoin("CFP_admin_user u","b.user_id=u.id")
- ->leftJoin("CFP_role r","b.role_id=r.id")->field("a.id,username,name,mobile,avatar,rolename,role_id,status")->where("a.id","=",$accoutID)
- ->find();
- }
- }
|