Commit 6696f4e1 by 杨树贤

补充spu字段

parent 48df4097
Showing with 10 additions and 2 deletions
......@@ -68,7 +68,10 @@ type LySku struct {
Ratio float64 `json:"ratio,omitempty"`
RatioUs float64 `json:"ratio_us,omitempty"`
SpuDetail string `json:"spu_detail,omitempty"`
ApplicationLevel string `json:"application_level"`
HasRohs string `json:"has_rohs"`
Series string `json:"series"`
Lifecycle string `json:"lifecycle"`
AcType int `json:"ac_type"`
//活动信息
HasGiftActivity int `json:"has_gift_activity"`
......
......@@ -251,7 +251,8 @@ func (ls *LyService) GetIsBuy(sku model.LySku) (isBuy int) {
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
}
if sku.Stock == 0 {
......@@ -300,6 +301,10 @@ func (ls *LyService) CombineSup(sku model.LySku, spuStr string) model.LySku {
sku.Status = int(gjson.Get(spuStr, "status").Int())
sku.Encap = gjson.Get(spuStr, "encap").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
}
......
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