mirror of
https://gitee.com/ctexthuang/hyperf-micro-svc.git
synced 2026-02-08 10:20:16 +08:00
feat : admin user finish
This commit is contained in:
@@ -11,6 +11,9 @@ declare(strict_types=1);
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Model\AdminUser;
|
||||
use Hyperf\Database\Concerns\BuildsQueries;
|
||||
use Hyperf\Database\Model\Builder;
|
||||
use Hyperf\Database\Model\Model;
|
||||
|
||||
/**
|
||||
* Class AdminUserRepository
|
||||
@@ -31,13 +34,4 @@ final class AdminUserRepository extends BaseRepository
|
||||
->where('username', $username)
|
||||
->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $id
|
||||
* @return array|null
|
||||
*/
|
||||
public function findById(mixed $id): ?array
|
||||
{
|
||||
return $this->getQuery()->whereKey($id)->first()?->toArray() ?? null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user