- add GetBindAuthInfo

This commit is contained in:
gazebo
2019-03-04 12:01:59 +08:00
parent c2896a69af
commit d67f09007d
3 changed files with 31 additions and 4 deletions

View File

@@ -16,3 +16,13 @@ func GetUserByID(db *DaoDB, fieldName, fieldValue string) (user *model.User, err
err = GetRows(db, &user, sql, utils.DefaultTimeValue, fieldValue)
return user, err
}
func GetUserBindAuthInfo(db *DaoDB, userID string) (authList []*model.AuthBind, err error) {
sql := `
SELECT *
FROM auth_bind t1
WHERE t1.deleted_at = ? AND t1.user_id = ?
`
err = GetRows(db, &authList, sql, utils.DefaultTimeValue, userID)
return authList, err
}