Commit c93edda8 authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update

parent 0fba3652
...@@ -14,7 +14,7 @@ func (d *Dao) GetProviderId(userId, platform string) (providerId string, err err ...@@ -14,7 +14,7 @@ func (d *Dao) GetProviderId(userId, platform string) (providerId string, err err
tx = d.db.Table((&dbModel.Identity{}).TableName()) tx = d.db.Table((&dbModel.Identity{}).TableName())
} }
err = tx.Select("provider_id").Where("user_id = ? and provider = ?", userId, platform).First(&providerId).Error err = tx.Select("provider_id").Where("user_id = ? and provider = ?", userId, platform).Take(&providerId).Error
if err == gorm.ErrRecordNotFound { if err == gorm.ErrRecordNotFound {
return "", nil return "", nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment