This commit is contained in:
laodaming 2023-10-12 18:33:29 +08:00
parent 2c8b8b1aac
commit 7b3a16353c

View File

@ -73,7 +73,10 @@ func (l *defaultImageHandle) LogoInfo(ctx context.Context, in *LogoInfoReq) (*Lo
var module = "profile"
userInfoGorm := l.MysqlConn.Where("module = ?", module)
userInfo := gmodel.FsUserInfo{}
if in.UserId == 0 && in.GuestId == 0 {
userInfoGorm.Where("user_id = ? and guest_id = ?", in.UserId, in.GuestId)
userInfo.UserId = &in.UserId
userInfo.GuestId = &in.GuestId
/*if in.UserId == 0 && in.GuestId == 0 {
userInfoGorm.Where("user_id = ? and guest_id = ?", in.UserId, in.GuestId)
} else {
if in.UserId > 0 {
@ -83,7 +86,7 @@ func (l *defaultImageHandle) LogoInfo(ctx context.Context, in *LogoInfoReq) (*Lo
userInfoGorm.Where("guest_id = ?", in.GuestId)
userInfo.GuestId = &in.GuestId
}
}
}*/
resFirst := userInfoGorm.First(&userInfo)
err := resFirst.Error
if err != nil {