fix
This commit is contained in:
parent
58423feac4
commit
f6f305f0f3
|
@ -36,6 +36,7 @@ type FsProduct struct {
|
||||||
RecommendProductSort *string `gorm:"default:'';" json:"recommend_product_sort"` //
|
RecommendProductSort *string `gorm:"default:'';" json:"recommend_product_sort"` //
|
||||||
SceneIds *string `gorm:"default:'';" json:"scene_ids"` //
|
SceneIds *string `gorm:"default:'';" json:"scene_ids"` //
|
||||||
IsCustomization *int64 `gorm:"default:0;" json:"is_customization"` // 是否可定制
|
IsCustomization *int64 `gorm:"default:0;" json:"is_customization"` // 是否可定制
|
||||||
|
WebsiteUnit *string `gorm:"default:'';" json:"website_unit"` //
|
||||||
Unit *string `gorm:"default:'';" json:"unit"` //
|
Unit *string `gorm:"default:'';" json:"unit"` //
|
||||||
SupplyChainManager *int64 `gorm:"default:0;" json:"supply_chain_manager"` // 供应链负责人
|
SupplyChainManager *int64 `gorm:"default:0;" json:"supply_chain_manager"` // 供应链负责人
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,14 @@ func (l *GetProductDetailLogic) GetProductDetail(req *types.GetProductDetailReq,
|
||||||
if *productInfo.IsDel == 1 {
|
if *productInfo.IsDel == 1 {
|
||||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "the product status is deleted")
|
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "the product status is deleted")
|
||||||
}
|
}
|
||||||
|
//解析产品单位
|
||||||
|
var websiteUnit interface{}
|
||||||
|
if *productInfo.WebsiteUnit != "" {
|
||||||
|
if err = json.Unmarshal([]byte(*productInfo.WebsiteUnit), &websiteUnit); err != nil {
|
||||||
|
logx.Error(err)
|
||||||
|
return resp.SetStatusWithMessage(basic.CodeJsonErr, "failed to parse website unit")
|
||||||
|
}
|
||||||
|
}
|
||||||
//获取产品类型
|
//获取产品类型
|
||||||
productTag, err := l.svcCtx.AllModels.FsTags.FindOne(l.ctx, *productInfo.Type)
|
productTag, err := l.svcCtx.AllModels.FsTags.FindOne(l.ctx, *productInfo.Type)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -256,6 +264,7 @@ func (l *GetProductDetailLogic) GetProductDetail(req *types.GetProductDetailReq,
|
||||||
IsEnv: *productInfo.IsProtection,
|
IsEnv: *productInfo.IsProtection,
|
||||||
IsMicro: *productInfo.IsMicrowave,
|
IsMicro: *productInfo.IsMicrowave,
|
||||||
IsCustomization: *productInfo.IsCustomization,
|
IsCustomization: *productInfo.IsCustomization,
|
||||||
|
WebsiteUnit: websiteUnit,
|
||||||
},
|
},
|
||||||
BaseColors: color_list.GetColor(),
|
BaseColors: color_list.GetColor(),
|
||||||
SizeList: rspSizeList,
|
SizeList: rspSizeList,
|
||||||
|
|
|
@ -163,6 +163,7 @@ type ProductInfo struct {
|
||||||
IsEnv int64 `json:"is_env"` //是否环保
|
IsEnv int64 `json:"is_env"` //是否环保
|
||||||
IsMicro int64 `json:"is_micro"` //是否可微波炉
|
IsMicro int64 `json:"is_micro"` //是否可微波炉
|
||||||
IsCustomization int64 `json:"is_customization"` //是否可定制产品
|
IsCustomization int64 `json:"is_customization"` //是否可定制产品
|
||||||
|
WebsiteUnit interface{} `json:"website_unit"` //产品前台网站单位
|
||||||
}
|
}
|
||||||
|
|
||||||
type TemplateTagColorInfo struct {
|
type TemplateTagColorInfo struct {
|
||||||
|
|
|
@ -179,6 +179,7 @@ type ProductInfo {
|
||||||
IsEnv int64 `json:"is_env"` //是否环保
|
IsEnv int64 `json:"is_env"` //是否环保
|
||||||
IsMicro int64 `json:"is_micro"` //是否可微波炉
|
IsMicro int64 `json:"is_micro"` //是否可微波炉
|
||||||
IsCustomization int64 `json:"is_customization"` //是否可定制产品
|
IsCustomization int64 `json:"is_customization"` //是否可定制产品
|
||||||
|
WebsiteUnit interface{} `json:"website_unit"` //产品前台网站单位
|
||||||
}
|
}
|
||||||
type TemplateTagColorInfo {
|
type TemplateTagColorInfo {
|
||||||
Colors [][]string `json:"colors"` //传入logo对应的算法颜色组
|
Colors [][]string `json:"colors"` //传入logo对应的算法颜色组
|
||||||
|
|
Loading…
Reference in New Issue
Block a user