Commit 6696f4e1 by 杨树贤

补充spu字段

parent 48df4097
Showing with 19 additions and 11 deletions
...@@ -60,16 +60,19 @@ type LySku struct { ...@@ -60,16 +60,19 @@ type LySku struct {
ClassName string `json:"class_name,omitempty"` ClassName string `json:"class_name,omitempty"`
ErpTax interface{} `json:"erp_tax"` ErpTax interface{} `json:"erp_tax"`
GoodsSn string `json:"goods_sn"` GoodsSn string `json:"goods_sn"`
GoodsDetails string `json:"goods_details"` GoodsDetails string `json:"goods_details"`
ClassName1 string `json:"class_name1,omitempty"` ClassName1 string `json:"class_name1,omitempty"`
ClassName2 string `json:"class_name2,omitempty"` ClassName2 string `json:"class_name2,omitempty"`
ClassName3 string `json:"class_name3,omitempty"` ClassName3 string `json:"class_name3,omitempty"`
Ratio float64 `json:"ratio,omitempty"` Ratio float64 `json:"ratio,omitempty"`
RatioUs float64 `json:"ratio_us,omitempty"` RatioUs float64 `json:"ratio_us,omitempty"`
SpuDetail string `json:"spu_detail,omitempty"` SpuDetail string `json:"spu_detail,omitempty"`
ApplicationLevel string `json:"application_level"`
AcType int `json:"ac_type"` HasRohs string `json:"has_rohs"`
Series string `json:"series"`
Lifecycle string `json:"lifecycle"`
AcType int `json:"ac_type"`
//活动信息 //活动信息
HasGiftActivity int `json:"has_gift_activity"` HasGiftActivity int `json:"has_gift_activity"`
GiftActivity GiftActivity `json:"gift_activity"` GiftActivity GiftActivity `json:"gift_activity"`
......
...@@ -251,7 +251,8 @@ func (ls *LyService) GetIsBuy(sku model.LySku) (isBuy int) { ...@@ -251,7 +251,8 @@ func (ls *LyService) GetIsBuy(sku model.LySku) (isBuy int) {
return return
} }
if sku.AbilityLevel == 0 && sku.OrgId == 1 && sku.Canal != "L0015730" { //L0016691 L0015730 L0015835 L0016793 L0016887 L0016886 L0016784
if sku.AbilityLevel == 0 && sku.OrgId == 1 && (sku.Canal != "L0015730" && sku.Canal != "L0015835" && sku.Canal != "L0016691" && sku.Canal != "L0016793" && sku.Canal != "L0016887" && sku.Canal != "L0016886" && sku.Canal != "L0016784") {
return return
} }
if sku.Stock == 0 { if sku.Stock == 0 {
...@@ -300,6 +301,10 @@ func (ls *LyService) CombineSup(sku model.LySku, spuStr string) model.LySku { ...@@ -300,6 +301,10 @@ func (ls *LyService) CombineSup(sku model.LySku, spuStr string) model.LySku {
sku.Status = int(gjson.Get(spuStr, "status").Int()) sku.Status = int(gjson.Get(spuStr, "status").Int())
sku.Encap = gjson.Get(spuStr, "encap").String() sku.Encap = gjson.Get(spuStr, "encap").String()
sku.SpuEccn = gjson.Get(spuStr, "eccn").String() sku.SpuEccn = gjson.Get(spuStr, "eccn").String()
sku.ApplicationLevel = gjson.Get(spuStr, "application_level").String()
sku.HasRohs = gjson.Get(spuStr, "has_rohs").String()
sku.Series = gjson.Get(spuStr, "series").String()
sku.Lifecycle = gjson.Get(spuStr, "lifecycle").String()
return sku return sku
} }
......
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