Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
jd_data_process
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
40532b61
authored
Oct 29, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add vc.py
parent
184b130c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
109 additions
and
4 deletions
vc.py
vc.py
View file @
40532b61
...
...
@@ -423,10 +423,10 @@ def modify_vc_purchase_price():
"@type"
:
"com.jd.pps.pub.dto.PpsBasePriceChangeDto"
,
"lineKey"
:
"1"
,
"changeReason"
:
"修改采购价格内部测试"
,
"discount"
:
13
,
# "discount": 13, 这个参数在文档中是必填,但是实际不用传。
"orgId"
:
-
1
,
"vendorCode"
:
"ichunt"
,
"price"
:
1
20.155
0
,
"price"
:
1
0
0
,
"currency"
:
"RMB"
,
"sku"
:
100124748677
,
}
...
...
@@ -438,6 +438,111 @@ def modify_vc_purchase_price():
ans
=
request_to_jd_vc
(
method_name
,
token
,
app_key
,
app_secret
,
param
)
print
(
json
.
dumps
(
ans
,
ensure_ascii
=
False
))
"""
创建促销活动接口
"""
def
create_vc_promotion
():
method_name
=
"jingdong.promo.activity.create"
token
=
"845ce8478b074103b9e78a769d5fa4831y2u"
app_key
=
"CA52430E90209F51D8F5D7B615DDE9AD"
app_secret
=
"c92691b2379c48de87e699c4c2f7fb32"
param
=
{
"request"
:
{
"baseRequest"
:
{
"@type"
:
"com.jd.promo.activity.sdk.model.request.BaseRequest"
,
},
"activityDTO"
:
{
"@type"
:
"com.jd.promo.activity.sdk.model.ActivityDTO"
,
"activityBaseDTO"
:
{
"@type"
:
"com.jd.promo.activity.sdk.model.ActivityBaseDTO"
,
"name"
:
"内部促销活动测试"
,
"type"
:
26
,
"beginTime"
:
"2024-10-29 14:14:00"
,
"endTime"
:
"2024-10-29 20:14:00"
,
"bound"
:
1
,
"venderType"
:
1
},
"activityScopeDTO"
:
{
"@type"
:
"com.jd.promo.activity.sdk.model.ActivityScopeDTO"
,
"channelList"
:
[
"1"
,
],
}
}
}
}
ans
=
request_to_jd_vc
(
method_name
,
token
,
app_key
,
app_secret
,
param
)
print
(
json
.
dumps
(
ans
,
ensure_ascii
=
False
))
"""
促销活动加品
"""
def
vc_promotion_add_sku
():
method_name
=
"jingdong.promo.activity.addSkus"
token
=
"845ce8478b074103b9e78a769d5fa4831y2u"
app_key
=
"CA52430E90209F51D8F5D7B615DDE9AD"
app_secret
=
"c92691b2379c48de87e699c4c2f7fb32"
param
=
{
"request"
:
{
"baseRequest"
:
{
"@type"
:
"com.jd.promo.activity.sdk.model.request.BaseRequest"
,
},
"activityParticipantDTO"
:
{
"@type"
:
"com.jd.promo.activity.sdk.model.ActivityParticipantDTO"
,
"bound"
:
1
,
"bindType"
:
1
,
"activityId"
:
3000001
,
"activitySkuDTOList"
:
[
{
"@type"
:
"com.jd.promo.activity.sdk.model.ActivitySkuDTO"
,
"skuId"
:
100124748677
,
"skuName"
:
"TAMURA 音频变压器 MET-46 起订数1个"
,
"skuBound"
:
1
,
"skuBindType"
:
1
,
"spuId"
:
101
,
"originPrice"
:
"100.18"
,
}
],
}
}
}
ans
=
request_to_jd_vc
(
method_name
,
token
,
app_key
,
app_secret
,
param
)
print
(
json
.
dumps
(
ans
,
ensure_ascii
=
False
))
"""
提交促销活动接口
"""
def
commit_vc_activity
():
method_name
=
"jingdong.promo.activity.commit"
token
=
"845ce8478b074103b9e78a769d5fa4831y2u"
app_key
=
"CA52430E90209F51D8F5D7B615DDE9AD"
app_secret
=
"c92691b2379c48de87e699c4c2f7fb32"
param
=
{
"activityId"
:
3000001
}
ans
=
request_to_jd_vc
(
method_name
,
token
,
app_key
,
app_secret
,
param
)
print
(
json
.
dumps
(
ans
,
ensure_ascii
=
False
))
def
delete_vc_activity
():
method_name
=
"jingdong.promo.activity.remove"
token
=
"845ce8478b074103b9e78a769d5fa4831y2u"
app_key
=
"CA52430E90209F51D8F5D7B615DDE9AD"
app_secret
=
"c92691b2379c48de87e699c4c2f7fb32"
param
=
{
"activityId"
:
3000001
}
ans
=
request_to_jd_vc
(
method_name
,
token
,
app_key
,
app_secret
,
param
)
print
(
json
.
dumps
(
ans
,
ensure_ascii
=
False
))
if
__name__
==
'__main__'
:
# modify_jd_vc_market_price()
modify_vc_purchase_price
()
\ No newline at end of file
# modify_vc_purchase_price()
# create_vc_promotion()
# get_vc_goods_info("100124748677")
# vc_promotion_add_sku()
delete_vc_activity
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment