Commit 163cee77 by mushishixian

单独跑任务

parent ef80ebc2
......@@ -2,12 +2,13 @@ package dao
import (
"fmt"
"github.com/ichunt2019/cfg/lib"
"github.com/imroc/req"
"github.com/tidwall/gjson"
"go_supplier_sever/app/model"
"strconv"
"time"
"github.com/ichunt2019/cfg/lib"
"github.com/imroc/req"
"github.com/tidwall/gjson"
)
func StatisticsSuppliersSkuNum() (err error) {
......@@ -48,6 +49,7 @@ func StatisticsSuppliersSkuNum() (err error) {
//统计供应商是否上传过sku
func StatisticsSuppliersHasUploadedSku() (err error) {
fmt.Println("开始统计历史上传SKU")
supplier := new(model.Supplier)
//先去根据供应商内部编码找出对应的supplierId
rows, err := Dao.GetDb("supplier").Table("lie_supplier_channel").Where("is_type = ?", 0).OrderBy("supplier_id desc").Rows(supplier)
......
package service
import (
"fmt"
// "fmt"
"go_supplier_sever/app/dao"
)
func StatisticsSupplierSkuStatus() (err error) {
fmt.Println("开始统计")
//先找出所有需要判断的供应商
err = dao.StatisticsSuppliersSkuNum()
if err != nil {
return err
}
// fmt.Println("开始统计")
// //先找出所有需要判断的供应商
// err = dao.StatisticsSuppliersSkuNum()
// if err != nil {
// return err
// }
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