From ace5fd61bd2cc9d6fad3c26dff9aef26db77b36d Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 19:37:52 +0800 Subject: [PATCH] nil return modify --- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 0f0396be8..42d573b5e 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -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