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 {