|
@@ -6,9 +6,9 @@ import (
|
|
|
|
|
|
type PlatformKuaishouUserInfoDao struct{}
|
|
|
|
|
|
-func (d PlatformKuaishouUserInfoDao) GetUserInfo(openId string) (*entity.PlatformKuaishouUserInfo, error) {
|
|
|
- var userInfo *entity.PlatformKuaishouUserInfo
|
|
|
- err := Db.Model(entity.PlatformKuaishouUserInfo{}).Select("open_id, platform_id, nick_name, head_uri, city, gender").Where("open_id = ?", openId).Find(userInfo).Error
|
|
|
+func (d PlatformKuaishouUserInfoDao) GetUserInfo(openId string) (entity.PlatformKuaishouUserInfo, error) {
|
|
|
+ var userInfo entity.PlatformKuaishouUserInfo
|
|
|
+ err := Db.Model(&entity.PlatformKuaishouUserInfo{}).Select("open_id, platform_id, nick_name, head_uri, city, gender").Where("open_id = ?", openId).Find(&userInfo).Error
|
|
|
if err != nil {
|
|
|
userInfo.OpenID = openId
|
|
|
userInfo.NickName = ""
|