19 lines
411 B
Go
19 lines
411 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gogf/gf/v2/database/gdb"
|
|
|
|
"36wisdom/biz/dao"
|
|
)
|
|
|
|
type adminUser struct{}
|
|
|
|
var AdminUser = &adminUser{}
|
|
|
|
// GetByUsername 按用户名取管理员账号(含密码列,登录校验用)。
|
|
func (s *adminUser) GetByUsername(ctx context.Context, username string) (gdb.Record, error) {
|
|
return dao.AdminUser.Model().Ctx(ctx).Where("username", username).One()
|
|
}
|