Commit 14b9872c by huangchengyi

1.0

parent 657403bc
......@@ -22,18 +22,28 @@ type LyClearGoodsList struct {
SinglePrice float64 `json:"single_price"` //最小单价
Stock int64 `json:"stock"` //库存
Moq int64 `json:"moq"` //最小起订量、起订量
Packaging string `json:"Packaging"` //包装
RawGoodsId string `json:"raw_goods_id"` //外链原始goods_sn,如digikey:{'raw_goods_id': 'AT28C64X-25PC-ND', 'raw_brand_name': 'Microchip Technology'}
RawBrandName string `json:"raw_brand_name"` //外链原始品牌名称,如digikey:{'raw_goods_id': 'AT28C64X-25PC-ND', 'raw_brand_name': 'Microchip Technology'}
Tiered []*TierItem `json:"tiered"` //价格梯度数量
PriceTemp []interface{} `json:"price_temp"` //拼接梯度,目前只有联营推送队列用
DigiKeyPartNumber string `json:"DigiKeyPartNumber"` //digkey 唯一编码 (额外字段)
ManufacturerLeadWeeks string `json:"ManufacturerLeadWeeks"` //digikey交期(额外字段)
}
type TierItem struct {
Purchases uint64 `json:"purchases"` //购买数量
Purchases int64 `json:"purchases"` //购买数量
PriceUs float64 `json:"price_us"` //数量对应的英文价格
PriceCn float64 `json:"price_cn"` //数量对应的中文价格
PriceAc float64 `json:"price_ac"`
}
//原始品牌(目前只有digikey使用)
type RawGoods struct {
RawGoodsId string `json:"raw_goods_id"` //原始goods_sn
RawBrandName string `json:"raw_brand_name"` //原始品牌名称
Pack string `json:"pack"` //包装
}
/*
供应商详情
Array
......
......@@ -26,6 +26,7 @@ type CommonLyService struct {
supplierId int64 //调用当前方法的供应商ID
supplierName string //调用当前方法的供应商名称
skuEsUpdataList []string //组装批量更新es数据
RawGoods map[string]*model.RawGoods //原始数据
}
//初始化类
......
......@@ -53,7 +53,7 @@ func OutLinkMouser(goodsName *string) map[string]*model.LyClearGoodsList {
onePrice = strings.ReplaceAll(strings.Trim(onePrice,"$"),",","")
skuPrice,_ := strconv.ParseFloat(onePrice,64) //转成float64
//数量转换
quantity := gjson.Get(priceItemStr, "Quantity").Uint()
quantity := gjson.Get(priceItemStr, "Quantity").Int()
if apiLowerPrice == 0 {
apiLowerPrice = skuPrice
......
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