diff --git a/server/resource/internal/logic/logocombinelogic.go b/server/resource/internal/logic/logocombinelogic.go index 53b02768..4679ee5e 100644 --- a/server/resource/internal/logic/logocombinelogic.go +++ b/server/resource/internal/logic/logocombinelogic.go @@ -45,22 +45,22 @@ func (l *LogoCombineLogic) LogoCombine(req *types.LogoCombineReq, userinfo *auth return resp.SetStatus(basic.CodeUnAuth) } - var userId int64 - var guestId int64 + // var userId int64 + // var guestId int64 - // 检查用户是否是游客 - if userinfo.IsGuest() { - // 如果是,使用游客ID和游客键名格式 - guestId = userinfo.GuestId - } else { - // 否则,使用用户ID和用户键名格式 - userId = userinfo.UserId - } + // // 检查用户是否是游客 + // if userinfo.IsGuest() { + // // 如果是,使用游客ID和游客键名格式 + // guestId = userinfo.GuestId + // } else { + // // 否则,使用用户ID和用户键名格式 + // userId = userinfo.UserId + // } res, err := l.svcCtx.Repositories.ImageHandle.LogoCombine(l.ctx, &repositories.LogoCombineReq{ - UserId: userId, - GuestId: guestId, - TemplateId: req.TemplateId, - TemplateTag: req.TemplateTag, + UserId: 0, + GuestId: 36, + TemplateId: 569, + TemplateTag: "b1a", Website: req.Website, Slogan: req.Slogan, Phone: req.Phone, diff --git a/service/repositories/image_handle.go b/service/repositories/image_handle.go index 75fbbf53..28ee5061 100644 --- a/service/repositories/image_handle.go +++ b/service/repositories/image_handle.go @@ -96,6 +96,7 @@ type ( func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq) (*LogoCombineRes, error) { // 查询logo最新基础信息 var metadata *string + var logoUrl *string userMaterialModel := gmodel.NewFsUserMaterialModel(l.MysqlConn) userMaterialInfo, err := userMaterialModel.FindLatestOne(ctx, in.UserId, in.GuestId) @@ -107,19 +108,21 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq return nil, err } metadata = userMaterialInfoDefault.Metadata + logoUrl = userMaterialInfoDefault.ResourceUrl } else { logx.Error(err) return nil, err } } else { metadata = userMaterialInfo.Metadata + logoUrl = userMaterialInfo.ResourceUrl } // 根据hash 查询数据资源 var hashKeyData = *in hashKeyData.GuestId = 0 hashKeyData.UserId = 0 - hashKeyData.LogoUrl = *userMaterialInfo.ResourceUrl + hashKeyData.LogoUrl = *logoUrl var hashKeyDataMap map[string]interface{} hashKeyDataB, _ := json.Marshal(hashKeyData) json.Unmarshal(hashKeyDataB, &hashKeyDataMap)