Commit d3cf4b6f by mushishixian

修改

parent 4f331a22
...@@ -60,7 +60,7 @@ message OTHER_ATTRS { ...@@ -60,7 +60,7 @@ message OTHER_ATTRS {
string gross_wegiht = 1; string gross_wegiht = 1;
} }
message LADDER_PRICE { message LadderPrice {
int64 purchases = 1; int64 purchases = 1;
float price_cn = 2; float price_cn = 2;
float price_us = 3; float price_us = 3;
...@@ -89,7 +89,7 @@ message GoodsModel { ...@@ -89,7 +89,7 @@ message GoodsModel {
int64 moq = 19; int64 moq = 19;
int64 mpq = 20; int64 mpq = 20;
// @inject_tag: json:"ladder_price" // @inject_tag: json:"ladder_price"
repeated LADDER_PRICE ladder_price = 21; repeated LadderPrice ladder_price = 21;
int64 update_time = 22; int64 update_time = 22;
string sku_name = 23; string sku_name = 23;
int64 mpl = 24; int64 mpl = 24;
......
...@@ -46,10 +46,10 @@ func GetGoodsInfo(goodsIdsStr string) (goodsList []*bom.GoodsModel, err error) { ...@@ -46,10 +46,10 @@ func GetGoodsInfo(goodsIdsStr string) (goodsList []*bom.GoodsModel, err error) {
goods.Status = data.Get("status").Int() goods.Status = data.Get("status").Int()
goods.GoodsType = data.Get("goods_type").Int() goods.GoodsType = data.Get("goods_type").Int()
goods.AcType = data.Get("ac_type").Int() goods.AcType = data.Get("ac_type").Int()
var ladderPrice []*bom.LADDER_PRICE var ladderPrice []*bom.LadderPrice
for _, price := range data.Get("ladder_price").Array() { for _, price := range data.Get("ladder_price").Array() {
var ladder bom.LADDER_PRICE var ladder bom.LadderPrice
ladder = bom.LADDER_PRICE{ ladder = bom.LadderPrice{
Purchases: price.Get("purchases").Int(), Purchases: price.Get("purchases").Int(),
PriceUs: float32(price.Get("price_us").Float()), PriceUs: float32(price.Get("price_us").Float()),
PriceCn: float32(price.Get("price_cn").Float()), PriceCn: float32(price.Get("price_cn").Float()),
......
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