fix:重构合图模块

This commit is contained in:
Hiven 2023-08-16 17:33:34 +08:00
parent 9bcb95e540
commit cb3e8d4db6
5 changed files with 9 additions and 3 deletions

View File

@ -18,6 +18,7 @@ type FsResource struct {
MetaKey1 *string `gorm:"index;default:'';" json:"meta_key1"` // 需要关键信息查询的自定义属性1,可以动态增加
ApiType *int64 `gorm:"default:1;" json:"api_type"` // 调用类型1=对外2=对内
BucketName *string `gorm:"default:'';" json:"bucket_name"` // 存储桶名: 1=持久 2=缓存
Source *string `gorm:"default:'';" json:"source"` // 来源
}
type FsResourceModel struct {
db *gorm.DB

View File

@ -16,8 +16,8 @@ type FsTags struct {
Icon *string `gorm:"default:'';" json:"icon"` // 标签图标
Status *int64 `gorm:"default:1;" json:"status"` // 状态 1可用
Description *string `gorm:"default:'';" json:"description"` // 介绍 Seo
RecommendProduct *string `gorm:"default:'';" json:"recommend_product"` //
RecommendProductSort *string `gorm:"default:'';" json:"recommend_product_sort"` //
RecommendProduct *string `gorm:"default:'';" json:"recommend_product"` // 推荐产品id例如: 1,3,4,5
RecommendProductSort *string `gorm:"default:'';" json:"recommend_product_sort"` // 推荐排序例如:1324
Category *int64 `gorm:"default:1;" json:"category"` // 分类1前台用的 2后台用的
}
type FsTagsModel struct {

View File

@ -65,6 +65,7 @@ func (l *LogoCombineLogic) LogoCombine(req *types.LogoCombineReq, userinfo *auth
Slogan: req.Slogan,
Phone: req.Phone,
Address: req.Address,
Qrcode: req.Qrcode,
})

View File

@ -214,6 +214,7 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
AwsSession: l.AwsSession,
}
uploadRes, err := upload.UploadFileByBase64(&file.UploadBaseReq{
Source: "combine-image",
FileHash: resourceId,
FileData: fileBase.(string),
UploadBucket: 1,

View File

@ -22,6 +22,7 @@ type Upload struct {
}
type UploadBaseReq struct {
Source string
FileHash string
FileData string
Metadata string
@ -119,6 +120,7 @@ func (upload *Upload) UploadFileByBase64(req *UploadBaseReq) (*UploadBaseRes, er
Metadata: &req.Metadata,
ApiType: &apiType,
BucketName: bucketName,
Source: &req.Source,
}).Error
if err != nil {
logx.Errorf("err:%+vdesc:%+v", err, "fail.upload.resourceInfoAdd.mysql")
@ -212,6 +214,7 @@ func (upload *Upload) UploadFileByByte(req *UploadBaseReq) (*UploadBaseRes, erro
Metadata: &req.Metadata,
ApiType: &apiType,
BucketName: bucketName,
Source: &req.Source,
}).Error
if err != nil {
logx.Errorf("err:%+vdesc:%+v", err, "fail.upload.resourceInfoAdd.mysql")