From 42c9cc61ab9daff5b3567f44dda161495687e7c0 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Wed, 15 Mar 2023 16:51:29 +0800 Subject: [PATCH] Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode # Conflicts: # pkg/common/mw/rpc_server_interceptor.go --- pkg/common/db/relation/user_model.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/common/db/relation/user_model.go b/pkg/common/db/relation/user_model.go index 4de1784a7..b99cc2539 100644 --- a/pkg/common/db/relation/user_model.go +++ b/pkg/common/db/relation/user_model.go @@ -13,12 +13,11 @@ type UserGorm struct { } func NewUserGorm(db *gorm.DB) relation.UserModelInterface { - return &UserGorm{DB: db.Model(&relation.UserModel{})} + return &UserGorm{DB: db} } func (u *UserGorm) db() *gorm.DB { - newDB := *u.DB - return &newDB + return u.DB.Model(&relation.UserModel{}) } // 插入多条