Commit dc5da61e by mushishixian

修改简化统计

parent c365e514
......@@ -107,6 +107,16 @@ func UpdateSupplierSkuNum(supplierId, skuNum int) (err error) {
if err != nil {
return err
}
//去修改历史上传过SKU的标志
if supplier.UploadedSku == -1 && skuNum > 0 {
fmt.Println("新增历史上传SKU供应商 : " + supplier.SupplierName)
supplier.UploadedSku = 1
_, err = Dao.GetDb("supplier").Table("lie_supplier_channel").Where("supplier_id = ?", supplierId).Cols("uploaded_sku").Update(supplier)
if err != nil {
return err
}
}
return
}
......
......@@ -8,11 +8,11 @@ import (
func StatisticsSupplierSkuStatus() (err error) {
fmt.Println("开始统计")
//先找出所有需要判断的供应商
// err = dao.StatisticsSuppliersSkuNum()
err = dao.StatisticsSuppliersSkuNum()
// if err != nil {
// return err
// }
err = dao.StatisticsSuppliersHasUploadedSku()
// err = dao.StatisticsSuppliersHasUploadedSku()
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