From ad1015c8b062412f4e2c6aa962375cb7a26b6710 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 15 Aug 2022 20:41:46 +0800 Subject: [PATCH] fix code --- pkg/common/db/mysql_model/im_mysql_model/ip_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/ip_model.go b/pkg/common/db/mysql_model/im_mysql_model/ip_model.go index cad838a50..cea844496 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/ip_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/ip_model.go @@ -34,7 +34,7 @@ func IsLimitUserLoginIp(userID string, LoginIp string) (bool, error) { func QueryIPLimits(ip string) (*db.IpLimit, error) { var ipLimit db.IpLimit - err := db.DB.MysqlDB.DefaultGormDB().Model(&db.IpLimit{}).Where("ip=?", ip).First(&ip).Error + err := db.DB.MysqlDB.DefaultGormDB().Model(&db.IpLimit{}).Where("ip=?", ip).First(&ipLimit).Error return &ipLimit, err }