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 {
ClassName string `json:"class_name,omitempty"`
ErpTax interface{} `json:"erp_tax"`
GoodsSn string `json:"goods_sn"`
GoodsDetails string `json:"goods_details"`
ClassName1 string `json:"class_name1,omitempty"`
ClassName2 string `json:"class_name2,omitempty"`
ClassName3 string `json:"class_name3,omitempty"`
Ratio float64 `json:"ratio,omitempty"`
RatioUs float64 `json:"ratio_us,omitempty"`
SpuDetail string `json:"spu_detail,omitempty"`
AcType int `json:"ac_type"`
GoodsSn string `json:"goods_sn"`
GoodsDetails string `json:"goods_details"`
ClassName1 string `json:"class_name1,omitempty"`
ClassName2 string `json:"class_name2,omitempty"`
ClassName3 string `json:"class_name3,omitempty"`
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"`
GiftActivity GiftActivity `json:"gift_activity"`
......
......@@ -2,7 +2,6 @@ package service
import (
"encoding/json"
"github.com/gogf/gf/util/gconv"
"go_sku_server/model"
c "go_sku_server/pkg/common"
"go_sku_server/pkg/gredis"
......@@ -13,6 +12,8 @@ import (
"strconv"
"strings"
"github.com/gogf/gf/util/gconv"
"github.com/gomodule/redigo/redis"
_ "github.com/iancoleman/orderedmap"
"github.com/syyongx/php2go"
......@@ -249,7 +250,9 @@ func (ls *LyService) GetIsBuy(sku model.LySku) (isBuy int) {
if len(sku.LadderPrice) == 0 {
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
}
if sku.Stock == 0 {
......@@ -298,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