Commit 63ae7482 by 杨树贤

Merge branch 'master' into dev

parents 3baa19be 6696f4e1
Showing with 22 additions and 12 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"`
......
...@@ -2,7 +2,6 @@ package service ...@@ -2,7 +2,6 @@ package service
import ( import (
"encoding/json" "encoding/json"
"github.com/gogf/gf/util/gconv"
"go_sku_server/model" "go_sku_server/model"
c "go_sku_server/pkg/common" c "go_sku_server/pkg/common"
"go_sku_server/pkg/gredis" "go_sku_server/pkg/gredis"
...@@ -13,6 +12,8 @@ import ( ...@@ -13,6 +12,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/gogf/gf/util/gconv"
"github.com/gomodule/redigo/redis" "github.com/gomodule/redigo/redis"
_ "github.com/iancoleman/orderedmap" _ "github.com/iancoleman/orderedmap"
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
...@@ -249,7 +250,9 @@ func (ls *LyService) GetIsBuy(sku model.LySku) (isBuy int) { ...@@ -249,7 +250,9 @@ func (ls *LyService) GetIsBuy(sku model.LySku) (isBuy int) {
if len(sku.LadderPrice) == 0 { if len(sku.LadderPrice) == 0 {
return return
} }
if sku.AbilityLevel == 0 {
//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 {
...@@ -298,6 +301,10 @@ func (ls *LyService) CombineSup(sku model.LySku, spuStr string) model.LySku { ...@@ -298,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