From bf9c6c9386cf79929b793daea2caf2eb20bfd721 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Fri, 8 Sep 2023 18:22:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=AE=BE=E7=BD=AE=E5=BD=93=E5=89=8Dlogo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/home-user-auth/internal/logic/userlogosetlogic.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/home-user-auth/internal/logic/userlogosetlogic.go b/server/home-user-auth/internal/logic/userlogosetlogic.go index cca077ca..74ee1e6a 100644 --- a/server/home-user-auth/internal/logic/userlogosetlogic.go +++ b/server/home-user-auth/internal/logic/userlogosetlogic.go @@ -109,11 +109,11 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth } } - + var module = "profile" if req.SetLogoSelected == 1 { var userInfo = &gmodel.FsUserInfo{} - BuilderDB := tx.Model(&gmodel.FsUserInfo{}).Where("module = ?", "profile") + BuilderDB := tx.Model(&gmodel.FsUserInfo{}).Where("module = ?", module) if userId > 0 { BuilderDB.Where("user_id=?", userId) } else { @@ -152,6 +152,7 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth userInfo.Utime = &nowTime if userInfo.Id == 0 { // 新增 + userInfo.Module = &module resCreate := tx.Model(&userInfo).Create(&userInfo) err = resCreate.Error } else {