fix:裁剪业务逻辑调整
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user