package admin

import (
	"hongze/hongze_yb/global"
)

// GetByAdminId 根据admin_id获取系统用户信息
func GetByAdminId(adminId int) (item *Admin, err error) {
	err = global.DEFAULT_MYSQL.Where("admin_id =  ? ", adminId).First(&item).Error
	return
}

// GetAdminByMobile 通过手机号获取系统用户信息
func GetAdminByMobile(mobile string) (item *Admin, err error) {
	err = global.DEFAULT_MYSQL.Model(Admin{}).Where("mobile = ?", mobile).First(&item).Error
	return
}