Commit 85942fef by mushishixian

fix

parent ef642a7e
......@@ -30,6 +30,7 @@ func StatisticsSuppliersSkuNum() (err error) {
}
result := resp.String()
skuNum := gjson.Get(result, "data.total").Int()
fmt.Println("供应商ID : ", supplier.SupplierId, "数量 : ", int(skuNum))
if skuNum == 0 {
continue
}
......
......@@ -36,12 +36,12 @@ func SaveSkuModeFromES() (err error) {
if len(goodsIdArr) > 0 {
//取一个goods_id就好
goodsId := goodsIdArr[0].String()
fmt.Println("skuId为 : " + goodsId)
//fmt.Println("skuId为 : " + goodsId)
//去redis里面找出对应的goods_label
redisCon := dao.Dao.GetRedisDbGroup("sku")
result := redisCon.HGet("goods_tag", goodsId).String()
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 {
//fmt.Println(supplier.SupplierId, goodsLabel)
err = dao.UpdateSupplierSkuMode(supplier.SupplierId, int(goodsLabel))
......
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