商品分类修改
This commit is contained in:
@@ -13,6 +13,8 @@ import (
|
||||
"time"
|
||||
"unicode"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/jdshopapi"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals/refutil"
|
||||
@@ -4427,5 +4429,15 @@ func focusC4Matters(ctx *jxcontext.Context, db *dao.DaoDB, v *model.Sku) (err er
|
||||
}
|
||||
|
||||
func RefreshJdsSkusStatus(ctx *jxcontext.Context) (err error) {
|
||||
handler := partner.GetPurchasePlatformFromVendorID(model.VendorIDJDShop).(partner.ISingleStoreStoreSkuHandler)
|
||||
remoteSkuList, err := handler.GetStoreSkusFullInfo(ctx, nil, 0, "", nil)
|
||||
for _, v := range remoteSkuList {
|
||||
if v.Status == jdshopapi.JdsSkuStatus2 {
|
||||
reason, err := api.JdShopAPI.FindOpReason(utils.Str2Int64(v.VendorNameID))
|
||||
if err == nil && reason == jdshopapi.PassReason {
|
||||
err = api.JdShopAPI.UpOrDown(utils.Str2Int64(v.VendorNameID), jdshopapi.JdsSkuStatus1)
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user