手动刷

This commit is contained in:
苏尹岚
2020-04-23 11:46:16 +08:00
parent 29f1bac104
commit ca65366c27
3 changed files with 10 additions and 9 deletions

View File

@@ -2200,7 +2200,7 @@ func writeToExcel(excelTitle []string, dataList interface{}, ctx *jxcontext.Cont
func RefreshJdDepot(ctx *jxcontext.Context) (err error) {
var thingMaps []model.ThingMap
sql := `
SELECT * FROM thing_map WHERE thing_type = ? AND vendor_id = ? AND vendor_org_code = ? AND deleted_at = ? ORDER BY thing_id DESC
SELECT * FROM thing_map WHERE sync_status = 1 AND thing_type = ? AND vendor_id = ? AND vendor_org_code = ? AND deleted_at = ? ORDER BY thing_id DESC
`
sqlParams := []interface{}{model.ThingTypeSku, model.VendorIDJD, "320406", utils.DefaultTimeValue}
err = dao.GetRows(dao.GetDB(), &thingMaps, sql, sqlParams)
@@ -2209,7 +2209,8 @@ func RefreshJdDepot(ctx *jxcontext.Context) (err error) {
}
if len(thingMaps) > 0 {
for _, v := range thingMaps {
_, err = api.JdAPI.RefreshJdDepot(int(utils.Str2Int64(v.VendorThingID)))
SyncSkus(ctx, nil, []int{0}, []string{"320406"}, nil, []int{int(v.ThingID)}, true)
// _, err = api.JdAPI.RefreshJdDepot(int(utils.Str2Int64(v.VendorThingID)))
}
}
return err