Commit ebcb9d1a by 岳巧源

modify vc stock num

parent a35dcaad
Showing with 25 additions and 2 deletions
...@@ -327,13 +327,36 @@ def set_vc_init_stock_and_delivery(stock_num, delivery_day, ware_id): ...@@ -327,13 +327,36 @@ def set_vc_init_stock_and_delivery(stock_num, delivery_day, ware_id):
app_key = "CA52430E90209F51D8F5D7B615DDE9AD" app_key = "CA52430E90209F51D8F5D7B615DDE9AD"
app_secret = "c92691b2379c48de87e699c4c2f7fb32" app_secret = "c92691b2379c48de87e699c4c2f7fb32"
param = { param = {
"productConfigReq": {
"productConfigInfoDtoList": [
{
"@type": "com.jd.jdi.ivc.product.publish.sdk.dto.product.ProductConfigInfoDto",
"skuStockNum": stock_num, "skuStockNum": stock_num,
"promiseDays": delivery_day, "promiseDays": delivery_day,
"czFlag": 1, "czFlag": 1,
"skuId": ware_id, "skuId": ware_id,
} }
]
}
}
ans = request_to_jd_vc(method_name, token, app_key, app_secret, param) ans = request_to_jd_vc(method_name, token, app_key, app_secret, param)
print(json.dumps(ans, ensure_ascii=False)) print(json.dumps(ans, ensure_ascii=False))
def modify_vc_stock_num(stock_num, ware_id):
"""
修改vc商品库存
"""
method_name = "jingdong.dropship.dps.modifyStockInfo"
token = "845ce8478b074103b9e78a769d5fa4831y2u"
app_key = "CA52430E90209F51D8F5D7B615DDE9AD"
app_secret = "c92691b2379c48de87e699c4c2f7fb32"
param = {
"sku": ware_id,
"stockNum": stock_num
}
ans = request_to_jd_vc(method_name, token, app_key, app_secret, param)
print(json.dumps(ans, ensure_ascii=False))
if __name__ == '__main__': if __name__ == '__main__':
set_vc_init_stock_and_delivery(23, 8, 100124079725) set_vc_init_stock_and_delivery(23, 14, 100150428424)
\ No newline at end of file \ No newline at end of file
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