platform_kuaishou_user.go 452 B

12345678910111213141516
  1. package db
  2. import (
  3. "context"
  4. "youngee_b_api/model/gorm_model"
  5. )
  6. func FindUserInfoByTalentId(ctx context.Context, talentId string) (*gorm_model.PlatformKuaishouUserInfo, error) {
  7. db := GetReadDB(ctx)
  8. var userInfo gorm_model.PlatformKuaishouUserInfo
  9. err := db.Model(gorm_model.PlatformKuaishouUserInfo{}).Where("talent_id = ? and platform_id = ?", talentId, 4).Find(&userInfo).Error
  10. if err != nil {
  11. return nil, err
  12. }
  13. return &userInfo, nil
  14. }