Commit 43a9e07d by mushishixian

fix

parent 39e37da3
Showing with 3 additions and 3 deletions
...@@ -34,7 +34,7 @@ func SaveSkuModeFromES() (err error) { ...@@ -34,7 +34,7 @@ func SaveSkuModeFromES() (err error) {
} }
result := resp.String() result := resp.String()
goodsIdArr := gjson.Get(result, "data.goods_id").Array() goodsIdArr := gjson.Get(result, "data.goods_id").Array()
fmt.Println("当前处理供应商为 : ", supplier.SupplierName) //fmt.Println("当前处理供应商为 : ", supplier.SupplierName)
if len(goodsIdArr) > 0 { if len(goodsIdArr) > 0 {
//取一个goods_id就好 //取一个goods_id就好
goodsId := goodsIdArr[0].String() goodsId := goodsIdArr[0].String()
...@@ -43,9 +43,9 @@ func SaveSkuModeFromES() (err error) { ...@@ -43,9 +43,9 @@ func SaveSkuModeFromES() (err error) {
redisCon := dao.Dao.GetRedisDbGroup("sku") redisCon := dao.Dao.GetRedisDbGroup("sku")
result := redisCon.HGet("goods_tag", goodsId).String() result := redisCon.HGet("goods_tag", goodsId).String()
goodsLabel := gjson.Get(result, "goods_label").Int() goodsLabel := gjson.Get(result, "goods_label").Int()
fmt.Println("供应商名称 : "+supplier.SupplierName+" goods_label为 : ", goodsLabel) //fmt.Println("供应商名称 : "+supplier.SupplierName+" goods_label为 : ", goodsLabel)
if int(goodsLabel) != 0 { if int(goodsLabel) != 0 {
fmt.Println(supplier.SupplierId, goodsLabel) //fmt.Println(supplier.SupplierId, goodsLabel)
err = dao.UpdateSupplierSkuMode(supplier.SupplierId, int(goodsLabel)) err = dao.UpdateSupplierSkuMode(supplier.SupplierId, int(goodsLabel))
if err != nil { if err != nil {
return err return err
......
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