恢复商品库京东id

This commit is contained in:
苏尹岚
2020-04-23 17:00:26 +08:00
parent 498bbaa2b0
commit cd86a5e446

View File

@@ -2211,10 +2211,13 @@ func RefreshJdDepot(ctx *jxcontext.Context) (err error) {
} }
} }
for _, v := range searchResults { for _, v := range searchResults {
if v.JdID == 2033469456 { if v.SkuID == 6042327 {
continue continue
} }
if v.JdID != 2033453015 { if v.SkuID == 6042324 {
continue
}
if v.SkuID != 6042319 {
continue continue
} }
param := &jdapi.OpSkuParam{ param := &jdapi.OpSkuParam{
@@ -2228,11 +2231,7 @@ func RefreshJdDepot(ctx *jxcontext.Context) (err error) {
continue continue
} }
time.Sleep(time.Second) time.Sleep(time.Second)
_, err = api.JdAPI.RefreshJdDepot(v.JdID) api.JdAPI.RefreshJdDepot(v.JdID)
if err != nil {
globals.SugarLogger.Debugf("RefreshJdDepot RefreshJdDepot", err.Error())
continue
}
sql := ` sql := `
UPDATE thing_map SET vendor_thing_id = ?, sync_status = ? UPDATE thing_map SET vendor_thing_id = ?, sync_status = ?
WHERE thing_type = ? AND vendor_id = ? AND vendor_org_code = ? AND deleted_at = ? AND thing_id = ? WHERE thing_type = ? AND vendor_id = ? AND vendor_org_code = ? AND deleted_at = ? AND thing_id = ?