1
This commit is contained in:
parent
9462856ff9
commit
ce223049c7
|
@ -23,6 +23,14 @@ type FsAdminMenu struct {
|
||||||
DeleteUid *int64 `gorm:"default:0;" json:"delete_uid"` // 删除人
|
DeleteUid *int64 `gorm:"default:0;" json:"delete_uid"` // 删除人
|
||||||
IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除:1=是 0=否
|
IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除:1=是 0=否
|
||||||
Status *int64 `gorm:"default:2;" json:"status"` // 状态:1=启用,2=停用
|
Status *int64 `gorm:"default:2;" json:"status"` // 状态:1=启用,2=停用
|
||||||
|
Type *int64 `gorm:"default:0;" json:"type"` // 类型:1=菜单,2=iframe,3=外链,4=按钮
|
||||||
|
Alias *string `gorm:"default:'';" json:"alias"` //
|
||||||
|
Icon *string `gorm:"default:'';" json:"icon"` //
|
||||||
|
Redirect *string `gorm:"default:'';" json:"redirect"` //
|
||||||
|
Highlight *string `gorm:"default:'';" json:"highlight"` //
|
||||||
|
View *string `gorm:"default:'';" json:"view"` //
|
||||||
|
Colour *string `gorm:"default:'';" json:"colour"` //
|
||||||
|
Label *int64 `gorm:"default:0;" json:"label"` // 整页路由:1=是,0=否
|
||||||
}
|
}
|
||||||
type FsAdminMenuModel struct {
|
type FsAdminMenuModel struct {
|
||||||
db *gorm.DB
|
db *gorm.DB
|
||||||
|
|
|
@ -14,8 +14,7 @@ type FsResource struct {
|
||||||
ResourceUrl *string `gorm:"default:'';" json:"resource_url"` // 资源 URL
|
ResourceUrl *string `gorm:"default:'';" json:"resource_url"` // 资源 URL
|
||||||
Version *string `gorm:"index;default:'0';" json:"version"` // 版本信息
|
Version *string `gorm:"index;default:'0';" json:"version"` // 版本信息
|
||||||
UploadedAt *time.Time `gorm:"index;default:'0000-00-00 00:00:00';" json:"uploaded_at"` //
|
UploadedAt *time.Time `gorm:"index;default:'0000-00-00 00:00:00';" json:"uploaded_at"` //
|
||||||
Metadata *string `gorm:"default:'';" json:"metadata"` // 元数据,json格式,存储图像分率
|
Metadata *[]byte `gorm:"default:'';" json:"metadata"` //
|
||||||
MetaKey1 *string `gorm:"default:'';" json:"meta_key1"` // 需要关键信息查询的自定义属性1,可以动态增加
|
|
||||||
ApiType *int64 `gorm:"default:1;" json:"api_type"` // 调用类型:1=对外,2=对内
|
ApiType *int64 `gorm:"default:1;" json:"api_type"` // 调用类型:1=对外,2=对内
|
||||||
BucketName *string `gorm:"default:'';" json:"bucket_name"` // 存储桶名: 1=持久 2=缓存
|
BucketName *string `gorm:"default:'';" json:"bucket_name"` // 存储桶名: 1=持久 2=缓存
|
||||||
Source *string `gorm:"default:'';" json:"source"` // 来源
|
Source *string `gorm:"default:'';" json:"source"` // 来源
|
||||||
|
|
|
@ -114,7 +114,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu
|
||||||
for _, v := range resourceMetadataList {
|
for _, v := range resourceMetadataList {
|
||||||
var metadata map[string]interface{}
|
var metadata map[string]interface{}
|
||||||
if v.Metadata != nil {
|
if v.Metadata != nil {
|
||||||
_ = json.Unmarshal([]byte(*v.Metadata), &metadata)
|
_ = json.Unmarshal(*v.Metadata, &metadata)
|
||||||
}
|
}
|
||||||
mapResourceMetadata[*v.ResourceUrl] = metadata
|
mapResourceMetadata[*v.ResourceUrl] = metadata
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,7 +144,7 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec
|
||||||
for _, v := range resourceMetadataList {
|
for _, v := range resourceMetadataList {
|
||||||
var metadata map[string]interface{}
|
var metadata map[string]interface{}
|
||||||
if v.Metadata != nil {
|
if v.Metadata != nil {
|
||||||
_ = json.Unmarshal([]byte(*v.Metadata), &metadata)
|
_ = json.Unmarshal(*v.Metadata, &metadata)
|
||||||
}
|
}
|
||||||
mapResourceMetadata[*v.ResourceUrl] = metadata
|
mapResourceMetadata[*v.ResourceUrl] = metadata
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,7 +217,7 @@ func (l *GetTagProductListLogic) getProductRelationInfo(req getProductRelationIn
|
||||||
for _, v := range resourceMetadataList {
|
for _, v := range resourceMetadataList {
|
||||||
var metadata map[string]interface{}
|
var metadata map[string]interface{}
|
||||||
if v.Metadata != nil {
|
if v.Metadata != nil {
|
||||||
_ = json.Unmarshal([]byte(*v.Metadata), &metadata)
|
_ = json.Unmarshal(*v.Metadata, &metadata)
|
||||||
}
|
}
|
||||||
req.MapResourceMetadata[*v.ResourceUrl] = metadata
|
req.MapResourceMetadata[*v.ResourceUrl] = metadata
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,7 @@ func (l *HomePageRecommendProductListLogic) HomePageRecommendProductList(req *ty
|
||||||
for _, v := range resourceMetadataList {
|
for _, v := range resourceMetadataList {
|
||||||
var metadata map[string]interface{}
|
var metadata map[string]interface{}
|
||||||
if v.Metadata != nil {
|
if v.Metadata != nil {
|
||||||
_ = json.Unmarshal([]byte(*v.Metadata), &metadata)
|
_ = json.Unmarshal(*v.Metadata, &metadata)
|
||||||
}
|
}
|
||||||
mapResourceMetadata[*v.ResourceUrl] = metadata
|
mapResourceMetadata[*v.ResourceUrl] = metadata
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user