nil return modify

pull/131/head
Gordon 3 years ago
parent 31fabb4624
commit ace5fd61bd

@ -114,7 +114,7 @@ func SelectSomeUserID(userIDList []string) ([]string, error) {
return nil, err
}
var resultArr []string
err = dbConn.Table("user").Where("user_id IN (?) ", userIDList).Find(&resultArr).Error
err = dbConn.Table("user").Where("user_id IN (?) ", userIDList).Pluck("user_id", &resultArr).Error
if err != nil {
return nil, err

Loading…
Cancel
Save