fix
This commit is contained in:
parent
bdd9a70a2d
commit
b7849935a0
model/gmodel
server
product-template-tag/internal/logic
product/internal/logic
|
@ -8,9 +8,10 @@ import (
|
|||
type FsProductTemplateTags struct {
|
||||
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
|
||||
Title *string `gorm:"default:'';" json:"title"` // 标题
|
||||
CoverImg *string `gorm:"default:'';" json:"cover_img"` // 封面图
|
||||
Cover *string `gorm:"default:'';" json:"cover"` // 封面图
|
||||
Status *int64 `gorm:"default:0;" json:"status"` // 状态 1:可用
|
||||
CreateAt *int64 `gorm:"default:0;" json:"create_at"` // 创建时间
|
||||
Groups *string `gorm:"default:'';" json:"groups"` // 分组信息
|
||||
}
|
||||
type FsProductTemplateTagsModel struct {
|
||||
db *gorm.DB
|
||||
|
|
|
@ -91,6 +91,7 @@ type AllModelsGen struct {
|
|||
FsTrade *FsTradeModel // fs_trade
|
||||
FsUser *FsUserModel // fs_user 用户表
|
||||
FsUserDesign *FsUserDesignModel // fs_user_design 废弃表
|
||||
FsUserInfo *FsUserInfoModel // fs_user_info 用户信息表
|
||||
FsUserMaterial *FsUserMaterialModel // fs_user_material 用户素材表
|
||||
FsUserStock *FsUserStockModel // fs_user_stock 用户云仓库存
|
||||
FsWebSet *FsWebSetModel // fs_web_set 网站配置表
|
||||
|
@ -186,6 +187,7 @@ func NewAllModels(gdb *gorm.DB) *AllModelsGen {
|
|||
FsTrade: NewFsTradeModel(gdb),
|
||||
FsUser: NewFsUserModel(gdb),
|
||||
FsUserDesign: NewFsUserDesignModel(gdb),
|
||||
FsUserInfo: NewFsUserInfoModel(gdb),
|
||||
FsUserMaterial: NewFsUserMaterialModel(gdb),
|
||||
FsUserStock: NewFsUserStockModel(gdb),
|
||||
FsWebSet: NewFsWebSetModel(gdb),
|
||||
|
|
|
@ -49,7 +49,7 @@ func (l *GetProductTemplateTagsLogic) GetProductTemplateTags(req *types.GetProdu
|
|||
list = append(list, types.GetProductTemplateTagsRsp{
|
||||
Id: v.Id,
|
||||
Tag: *v.Title,
|
||||
Cover: *v.CoverImg,
|
||||
Cover: *v.Cover,
|
||||
})
|
||||
}
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", list)
|
||||
|
|
|
@ -110,14 +110,10 @@ func (l *GetTemplateByPidLogic) GetTemplateByPid(req *types.GetTemplateByPidReq,
|
|||
_ = json.Unmarshal([]byte(*templateInfo.SwitchInfo), &switchInfo)
|
||||
}
|
||||
modelInfo := modelList[modelIndex]
|
||||
var material interface{}
|
||||
if info["module_data"] != nil && info["module_data"]["material"] != nil {
|
||||
material = info["module_data"]["material"]
|
||||
}
|
||||
mapKey := fmt.Sprintf("_%d", *modelInfo.SizeId)
|
||||
rsp[mapKey] = map[string]interface{}{
|
||||
"id": templateInfo.Id,
|
||||
"material": material,
|
||||
"material": *templateInfo.MaterialImg,
|
||||
"material_data": switchInfo,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user