fix
This commit is contained in:
parent
2a1ceded61
commit
2c8b8b1aac
|
@ -73,12 +73,16 @@ func (l *defaultImageHandle) LogoInfo(ctx context.Context, in *LogoInfoReq) (*Lo
|
||||||
var module = "profile"
|
var module = "profile"
|
||||||
userInfoGorm := l.MysqlConn.Where("module = ?", module)
|
userInfoGorm := l.MysqlConn.Where("module = ?", module)
|
||||||
userInfo := gmodel.FsUserInfo{}
|
userInfo := gmodel.FsUserInfo{}
|
||||||
if in.UserId > 0 {
|
if in.UserId == 0 && in.GuestId == 0 {
|
||||||
userInfoGorm.Where("user_id = ?", in.UserId)
|
userInfoGorm.Where("user_id = ? and guest_id = ?", in.UserId, in.GuestId)
|
||||||
userInfo.UserId = &in.UserId
|
|
||||||
} else {
|
} else {
|
||||||
userInfoGorm.Where("guest_id = ?", in.GuestId)
|
if in.UserId > 0 {
|
||||||
userInfo.GuestId = &in.GuestId
|
userInfoGorm.Where("user_id = ?", in.UserId)
|
||||||
|
userInfo.UserId = &in.UserId
|
||||||
|
} else {
|
||||||
|
userInfoGorm.Where("guest_id = ?", in.GuestId)
|
||||||
|
userInfo.GuestId = &in.GuestId
|
||||||
|
}
|
||||||
}
|
}
|
||||||
resFirst := userInfoGorm.First(&userInfo)
|
resFirst := userInfoGorm.First(&userInfo)
|
||||||
err := resFirst.Error
|
err := resFirst.Error
|
||||||
|
|
Loading…
Reference in New Issue
Block a user