fix
This commit is contained in:
@@ -54,15 +54,16 @@ type (
|
||||
GuestId int64 `json:"guest_id"`
|
||||
}
|
||||
LogoInfoRes struct {
|
||||
Metadata *string `json:"metadata"`
|
||||
LogoUrl *string `json:"logo_url"`
|
||||
Metadata *string `json:"metadata"`
|
||||
LogoUrl *string `json:"logo_url"`
|
||||
UserInfoMetadata *string `json:"user_info_metadata"`
|
||||
}
|
||||
)
|
||||
|
||||
func (l *defaultImageHandle) LogoInfo(ctx context.Context, in *LogoInfoReq) (*LogoInfoRes, error) {
|
||||
var metadata *string
|
||||
var logoUrl *string
|
||||
|
||||
var userInfoMetadata *string
|
||||
// 更新用户信息
|
||||
var module = "profile"
|
||||
userInfoGorm := l.MysqlConn.Where("module = ?", module)
|
||||
@@ -82,6 +83,10 @@ func (l *defaultImageHandle) LogoInfo(ctx context.Context, in *LogoInfoReq) (*Lo
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if userInfo.Id != 0 {
|
||||
tmp := string(*userInfo.Metadata)
|
||||
userInfoMetadata = &tmp
|
||||
}
|
||||
var userMaterialInfo gmodel.FsUserMaterial
|
||||
userMaterialModel := gmodel.NewFsUserMaterialModel(l.MysqlConn)
|
||||
|
||||
@@ -134,8 +139,9 @@ func (l *defaultImageHandle) LogoInfo(ctx context.Context, in *LogoInfoReq) (*Lo
|
||||
logoUrl = userMaterialInfo.ResourceUrl
|
||||
}
|
||||
return &LogoInfoRes{
|
||||
Metadata: metadata,
|
||||
LogoUrl: logoUrl,
|
||||
Metadata: metadata,
|
||||
LogoUrl: logoUrl,
|
||||
UserInfoMetadata: userInfoMetadata,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user