fix:裁剪业务逻辑调整
This commit is contained in:
parent
eb3828a86a
commit
3a2abde3b4
|
@ -133,12 +133,11 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us
|
|||
Height: "0",
|
||||
Proportion: "100",
|
||||
})
|
||||
logoUrl = resLogoStandard.ResourceUrl
|
||||
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatus(basic.CodeServiceErr)
|
||||
}
|
||||
logoUrl = resLogoStandard.ResourceUrl
|
||||
} else {
|
||||
logoUrl = uploadRes.ResourceUrl
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ func (l *defaultImageHandle) LogoInfoSet(ctx context.Context, in *LogoInfoSetReq
|
|||
|
||||
err := curl.NewClient(ctx, &curl.Config{
|
||||
BaseUrl: *l.BLMServiceUrl,
|
||||
Url: constants.BLMServiceUrlLogoCombine,
|
||||
Url: constants.BLMServiceUrlLogoFeatureExtraction,
|
||||
}).PostJson(postMap, &resultBLM)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
|
@ -70,7 +70,9 @@ func (l *defaultImageHandle) LogoInfoSet(ctx context.Context, in *LogoInfoSetReq
|
|||
logx.Error(err)
|
||||
return nil, err
|
||||
}
|
||||
return nil, nil
|
||||
return &LogoInfoSetRes{
|
||||
Res: resultBLM.Data.(string),
|
||||
}, nil
|
||||
}
|
||||
|
||||
/* logo信息 */
|
||||
|
|
|
@ -81,7 +81,10 @@ func (upload *Upload) UploadFileByBase64(req *UploadBaseReq) (*UploadBaseRes, er
|
|||
uploadBaseRes.ResourceId = resourceId
|
||||
uploadBaseRes.ResourceUrl = *resourceInfo.ResourceUrl
|
||||
} else {
|
||||
if req.ResourceId != "" {
|
||||
resourceId = req.ResourceId
|
||||
}
|
||||
|
||||
dist, contentType, err := FileBase64ToByte(req.FileData)
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user