Commit 279aad4c by mushishixian

fix

parent ee38ee38
......@@ -40,7 +40,7 @@ func StatisticsSuppliersSkuNum() (err error) {
return err
}
}
fmt.Println("执行完成,有上传sku的供应商数量为 : ",num)
fmt.Println("执行完成,有上传sku的供应商数量为 : ", num)
return
}
......@@ -57,7 +57,7 @@ func UpdateSupplierSkuNum(supplierId, skuNum int) (err error) {
}
supplier.SkuNum = skuNum
//还要去写映射表lie_supplier_merger_mapping
_, err = Dao.GetDb("supplier").Table("lie_supplier_channel").Where("supplier_id = ?", supplierId).Update(supplier)
_, err = Dao.GetDb("supplier").Table("lie_supplier_channel").Where("supplier_id = ?", supplierId).Cols("sku_num").Update(supplier)
if err != nil {
return err
}
......@@ -77,7 +77,7 @@ func UpdateSupplierSkuMode(supplierId, skuMode int) (err error) {
}
supplier.SkuMode = skuMode
//还要去写映射表lie_supplier_merger_mapping
_, err = Dao.GetDb("supplier").Table("lie_supplier_channel").Where("supplier_id = ?", supplierId).Update(supplier)
_, err = Dao.GetDb("supplier").Table("lie_supplier_channel").Cols("sku_mode").Where("supplier_id = ?", supplierId).Update(supplier)
if err != nil {
return err
}
......
......@@ -50,6 +50,10 @@ func SaveSkuModeFromES() (err error) {
}
}
}
err = dao.UpdateSupplierSkuMode(supplier.SupplierId, 0)
if err != nil {
return err
}
time.Sleep(100 * time.Millisecond)
}
fmt.Println("执行完成")
......
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