Commit 8776b963 by 杨树贤

加入新字段

parent 3edab69f
...@@ -34,6 +34,8 @@ func (ls *LyService) GetSpuAttr(spuId string) (attrsResult interface{}) { ...@@ -34,6 +34,8 @@ func (ls *LyService) GetSpuAttr(spuId string) (attrsResult interface{}) {
data["attr_name"] = value.AttrName data["attr_name"] = value.AttrName
//€符号全部替换为逗号 //€符号全部替换为逗号
data["attr_value"] = strings.ReplaceAll(value.AttrValue, "€", ",") data["attr_value"] = strings.ReplaceAll(value.AttrValue, "€", ",")
data["attr_value_id"] = value.AttrValueId
data["attr_id"] = value.AttrId
data["attr_unit"] = value.AttrUnit data["attr_unit"] = value.AttrUnit
attrsList = append(attrsList, data) attrsList = append(attrsList, data)
attrsResult = attrsList attrsResult = attrsList
......
...@@ -119,9 +119,11 @@ type SpuAttr struct { ...@@ -119,9 +119,11 @@ type SpuAttr struct {
} }
type AttrsExtend struct { type AttrsExtend struct {
AttrName string `bson:"attr_name" json:"attr_name"` AttrId int `bson:"attr_id" json:"attr_id"`
AttrValue string `bson:"attr_value" json:"attr_value"` AttrName string `bson:"attr_name" json:"attr_name"`
AttrUnit string `bson:"attr_unit" json:"attr_unit,omitempty"` AttrValue string `bson:"attr_value" json:"attr_value"`
AttrValueId int `bson:"attr_value_id" json:"attr_value_id"`
AttrUnit string `bson:"attr_unit" json:"attr_unit,omitempty"`
} }
// H获取供应链标准品牌 // H获取供应链标准品牌
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment