123456789101112131415161718 |
- package dao
- import (
- "github.com/sirupsen/logrus"
- "youngee_b_api/app/entity"
- )
- type PlatformKuaishouUserInfoDao struct{}
- func (d PlatformKuaishouUserInfoDao) SelectUserInfo(talentId string) (*entity.PlatformKuaishouUserInfo, error) {
- var userInfo *entity.PlatformKuaishouUserInfo
- err := Db.Model(entity.PlatformKuaishouUserInfo{}).Select("open_id, nick_name, head_uri").Where("talent_id = ?", talentId).Find(&userInfo).Error
- if err != nil {
- logrus.Errorf("[SelectUserInfo] error query, err:%+v", err)
- return nil, err
- }
- return userInfo, nil
- }
|