Documentation ¶
Index ¶
- func CreateAdmin(name, avatar, email, password, salt string) int64
- func DeleteAdmin(id int64) int64
- func GetAdminInfoById(adminId int64, selectFields []string) (*schema.Admin, error)
- func GetAdminInfoByName(name string, selectFields []string) (*schema.Admin, error)
- func GetAdminInfoByWx(openId, unionId string, selectFields []string) (*schema.Admin, error)
- func GetAdminList(offset, count uint, sort string, filter map[string]interface{}, ...) ([]*schema.Admin, error)
- func IsAdminExist(adminId string) bool
- func IsAdminExistByEmail(email string) bool
- func IsAdminExistByName(name string) bool
- func UpdateAdminField(id int64, data map[string]interface{}) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAdmin ¶
Description: 创建管理员
@param name 管理员名 @param avatar 头像 @param email 邮箱账号 @param password 密码 @param salt 加盐 @param roles 所属角色
@return admin_id
func GetAdminInfoById ¶
Description: 根据id获取管理员信息
func GetAdminInfoByName ¶
Description: 根据账号获取管理员信息
func GetAdminInfoByWx ¶
Description: 根据微信 openid unionid 获取管理员信息
func GetAdminList ¶
func GetAdminList(offset, count uint, sort string, filter map[string]interface{}, selectFields []string) ([]*schema.Admin, error)
获取管理员列表 @param offset uint 起始位移 @param count uint 获取行数 @param sort string 字段排序 如"a desc,b asc,..." @param filter map[string]interface{} 字段过滤条件
func IsAdminExistByEmail ¶
Description: 根据邮箱验证管理员账号是否已存在
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.