sc-common-interface 3.2.3__tar.gz → 3.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/PKG-INFO +1 -1
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/LiveCommonInterface.py +22 -21
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/PostCommonInterface.py +36 -34
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/setup.py +1 -1
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/CommonOa.py +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/McCommonInterface.py +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/OperaMysql.py +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/OperaRedis.py +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/ScPulsar.py +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/ScWebsocket.py +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/__init__.py +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/pra.py +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/setup.cfg +0 -0
{sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -15,7 +15,7 @@ def delete_post(data):
|
|
|
15
15
|
env = data["env"]
|
|
16
16
|
headers = data["headers"]
|
|
17
17
|
sales_id = data["sales_id"]
|
|
18
|
-
url = "%s/api/
|
|
18
|
+
url = "%s/admin/api/bff-web/post/sales/%s" % (env, sales_id)
|
|
19
19
|
res = requests.delete(url, headers=headers).json()
|
|
20
20
|
return res
|
|
21
21
|
|
|
@@ -24,7 +24,7 @@ def delete_relate_post(data):
|
|
|
24
24
|
"""删除串接的facebook或fb group 避免影响串接"""
|
|
25
25
|
env = data["env"]
|
|
26
26
|
headers = data["headers"]
|
|
27
|
-
url = "%s/api/
|
|
27
|
+
url = "%s/admin/api/bff-web/post/sales" % env
|
|
28
28
|
sales_type = data.get("sales_type", "LIVE")
|
|
29
29
|
param = {"page_num": 1, "page_size": 100, "sales_type": sales_type}
|
|
30
30
|
platform = "facebook"
|
|
@@ -101,7 +101,7 @@ def get_sales_id(data):
|
|
|
101
101
|
"""
|
|
102
102
|
env = data["env"]
|
|
103
103
|
headers = data["headers"]
|
|
104
|
-
url = "%s/api/
|
|
104
|
+
url = "%s/admin/api/bff-web/post/sales" % env
|
|
105
105
|
param = {"page_num": 1, "page_size": 100, "sales_type": "LIVE"}
|
|
106
106
|
platform = "LINE"
|
|
107
107
|
if "platform" in data:
|
|
@@ -444,15 +444,15 @@ def get_activity_detail(data):
|
|
|
444
444
|
type = data["type"]
|
|
445
445
|
url = ""
|
|
446
446
|
if type in "luckyDraw":
|
|
447
|
-
url = "%s/api/activity/luckyDraw/%s" % (env, activity_id)
|
|
447
|
+
url = "%s/admin/api/bff-web/live/activity/luckyDraw/%s" % (env, activity_id)
|
|
448
448
|
elif type in "voucher":
|
|
449
|
-
url = "%s/api/activity/voucher/%s" % (env, activity_id)
|
|
449
|
+
url = "%s/admin/api/bff-web/live/activity/voucher/%s" % (env, activity_id)
|
|
450
450
|
elif type in "answerFirst":
|
|
451
|
-
url = "%s/api/activity/answerFirst/%s" % (env, activity_id)
|
|
451
|
+
url = "%s/admin/api/bff-web/live/activity/answerFirst/%s" % (env, activity_id)
|
|
452
452
|
elif type in "bidding":
|
|
453
|
-
url = "%s/api/activity/bidding/%s" % (env, activity_id)
|
|
453
|
+
url = "%s/admin/api/bff-web/live/activity/bidding/%s" % (env, activity_id)
|
|
454
454
|
elif type in "vote":
|
|
455
|
-
url = "%s/api/activity/vote/%s" % (env, activity_id)
|
|
455
|
+
url = "%s/admin/api/bff-web/live/activity/vote/%s" % (env, activity_id)
|
|
456
456
|
response = requests.get(url, headers=headers).json()
|
|
457
457
|
return response
|
|
458
458
|
|
|
@@ -652,7 +652,7 @@ def get_channel(data):
|
|
|
652
652
|
headers = data["headers"]
|
|
653
653
|
platform = data["platform"]
|
|
654
654
|
valid = data.get("valid",True)
|
|
655
|
-
url = "%s/api/
|
|
655
|
+
url = "%s/admin/api/bff-web/live/multiPlatformChannelList?platformList=%s" % (env, platform.upper())
|
|
656
656
|
response = requests.get(url, headers=headers)
|
|
657
657
|
if response.status_code == 200 and response.json()["code"] == "SUCCESS":
|
|
658
658
|
response = response.json()
|
|
@@ -1039,7 +1039,7 @@ def get_stamp_time(data):
|
|
|
1039
1039
|
def get_line_info(data):
|
|
1040
1040
|
env = data["env"]
|
|
1041
1041
|
headers = data["headers"]
|
|
1042
|
-
url = "%s/api/
|
|
1042
|
+
url = "%s/admin/api/bff-web/live/lineConnectInfo" % env
|
|
1043
1043
|
response = requests.get(url, headers=headers).json()
|
|
1044
1044
|
shopId = response["data"]["shopInfo"]["shopId"]
|
|
1045
1045
|
platformChannelId = response["data"]["channel"]["platformChannelId"]
|
|
@@ -1441,7 +1441,7 @@ def save_global_config(data):
|
|
|
1441
1441
|
"保存直播间通用配置"
|
|
1442
1442
|
env = data["env"]
|
|
1443
1443
|
headers = data["headers"]
|
|
1444
|
-
url = "%s/api/
|
|
1444
|
+
url = "%s/admin/api/bff-web/post/config/global/LIVE" % env
|
|
1445
1445
|
patternModel = "INCLUDE_MATCH"
|
|
1446
1446
|
keywordValidInLive = True
|
|
1447
1447
|
keywordValidAfterLive = False
|
|
@@ -1685,7 +1685,7 @@ def save_global_config(data):
|
|
|
1685
1685
|
def get_global_config(data):
|
|
1686
1686
|
env = data["env"]
|
|
1687
1687
|
headers = data["headers"]
|
|
1688
|
-
url = "%s/api/
|
|
1688
|
+
url = "%s/admin/api/bff-web/post/config/global/LIVE" % env
|
|
1689
1689
|
response = requests.get(url, headers=headers).json()
|
|
1690
1690
|
# print(response)
|
|
1691
1691
|
return response
|
|
@@ -2130,7 +2130,7 @@ def add_auto_reply(data):
|
|
|
2130
2130
|
env = data["env"]
|
|
2131
2131
|
headers = data["headers"]
|
|
2132
2132
|
sales_id = data["sales_id"]
|
|
2133
|
-
url = "%s/api/
|
|
2133
|
+
url = "%s/admin/api/bff-web/live/sale/%s/auto_reply" % (env, sales_id)
|
|
2134
2134
|
stamp = int(time.time())
|
|
2135
2135
|
name = "自动回复工具名称%d" % stamp
|
|
2136
2136
|
keyword_type = "ANY"
|
|
@@ -2178,7 +2178,7 @@ def enable_auto_reply(data):
|
|
|
2178
2178
|
auto_reply_id = data["auto_reply_id"]
|
|
2179
2179
|
status = True
|
|
2180
2180
|
status = data.get("status", status)
|
|
2181
|
-
url = "%s/api/
|
|
2181
|
+
url = "%s/admin/api/bff-web/live/sale/%s/auto_reply/%s/switch" % (env, sales_id, auto_reply_id)
|
|
2182
2182
|
body = {
|
|
2183
2183
|
"status": status
|
|
2184
2184
|
}
|
|
@@ -2195,7 +2195,7 @@ def edit_auto_reply(data):
|
|
|
2195
2195
|
headers = data["headers"]
|
|
2196
2196
|
sales_id = data["sales_id"]
|
|
2197
2197
|
auto_reply_id = data["auto_reply_id"]
|
|
2198
|
-
url = "%s/api/
|
|
2198
|
+
url = "%s/admin/api/bff-web/live/sale/%s/auto_reply" % (env, sales_id)
|
|
2199
2199
|
stamp = int(time.time())
|
|
2200
2200
|
name = "自动回复工具名称%d" % stamp
|
|
2201
2201
|
keyword_type = "ANY"
|
|
@@ -2240,7 +2240,7 @@ def delete_auto_reply(data):
|
|
|
2240
2240
|
headers = data["headers"]
|
|
2241
2241
|
sales_id = data["sales_id"]
|
|
2242
2242
|
auto_reply_id = data["auto_reply_id"]
|
|
2243
|
-
url = "%s/api/
|
|
2243
|
+
url = "%s/admin/api/bff-web/live/sale/%s/auto_reply" % (env, sales_id)
|
|
2244
2244
|
body = {
|
|
2245
2245
|
"id": auto_reply_id
|
|
2246
2246
|
}
|
|
@@ -2313,7 +2313,7 @@ def get_fb_sales_id(data):
|
|
|
2313
2313
|
"""
|
|
2314
2314
|
env = data["env"]
|
|
2315
2315
|
headers = data["headers"]
|
|
2316
|
-
url = "%s/api/
|
|
2316
|
+
url = "%s/admin/api/bff-web/post/sales" % env
|
|
2317
2317
|
param = {"page_num": 1, "page_size": 100, "sales_type": "LIVE"}
|
|
2318
2318
|
platform = data.get("platform", "FACEBOOK")
|
|
2319
2319
|
param["platforms"] = platform.upper()
|
|
@@ -2457,8 +2457,8 @@ def search_product_by_keyword(data):
|
|
|
2457
2457
|
headers = data["headers"]
|
|
2458
2458
|
keyword = data["keyword"]
|
|
2459
2459
|
sales_id = data["sales_id"]
|
|
2460
|
-
url = "%s/admin/api/bff-web/live/sale/%s/
|
|
2461
|
-
param = {"salesId": sales_id, "
|
|
2460
|
+
url = "%s/admin/api/bff-web/live/sale/%s/sale_list/product" % (env, sales_id)
|
|
2461
|
+
param = {"salesId": sales_id, "pageIndex": 1, "pageSize": 20, "query": keyword, "queryType": "KEYWORD"}
|
|
2462
2462
|
response = requests.get(url, headers=headers, params=param).json()
|
|
2463
2463
|
return response
|
|
2464
2464
|
|
|
@@ -2764,7 +2764,7 @@ def line_bind_webhook(data):
|
|
|
2764
2764
|
def get_live_global(data):
|
|
2765
2765
|
env = data["env"]
|
|
2766
2766
|
headers = data["headers"]
|
|
2767
|
-
url = "%s/api/
|
|
2767
|
+
url = "%s/admin/api/bff-web/post/config/global/LIVE"%env
|
|
2768
2768
|
res = requests.get(url, headers=headers).json()
|
|
2769
2769
|
return res
|
|
2770
2770
|
|
|
@@ -2776,7 +2776,8 @@ def get_live_global(data):
|
|
|
2776
2776
|
|
|
2777
2777
|
|
|
2778
2778
|
if __name__ == "__main__":
|
|
2779
|
-
|
|
2779
|
+
data = {'object': 'page', 'entry': [{'time': 1790067214820, 'id': '102079935646743', 'messaging': [{'sender': {'id': '4624646680906316'}, 'recipient': {'id': '102079935646743'}, 'timestamp': 1790067214820, 'postback': {'title': 'continue--1790067214', 'payload': '{"postCheckoutCartLink":"","postId":"102079935646743_1456428393206933","salesId":"725225","type":"post_continue"}', 'mid': 'm_w6KNGd0PMndK0LvCw7Hzy1zsVSWT0fpN3ievQ9LtB0NxnnTQGDMyKI5DFeVbaJIRni1cqqJYXIJ-wq98aw1790067214820'}}]}]}
|
|
2780
|
+
|
|
2780
2781
|
|
|
2781
2782
|
|
|
2782
2783
|
|
{sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/PostCommonInterface.py
RENAMED
|
@@ -38,7 +38,7 @@ def create_general_post(data):
|
|
|
38
38
|
title = "接口自动化创建的普通贴文%d"%int(time.time())
|
|
39
39
|
if "title" in data:
|
|
40
40
|
title = data["title"]
|
|
41
|
-
url = "%s/api/
|
|
41
|
+
url = "%s/admin/api/bff-web/post/sale"%env
|
|
42
42
|
body = {
|
|
43
43
|
"platform": platform,
|
|
44
44
|
"type": 1,
|
|
@@ -91,7 +91,7 @@ def create_commerce_post(data):
|
|
|
91
91
|
title = "接口自动化创建的留言串销售贴文%d" % int(time.time())
|
|
92
92
|
if "title" in data:
|
|
93
93
|
title = data["title"]
|
|
94
|
-
url = "%s/api/
|
|
94
|
+
url = "%s/admin/api/bff-web/post/sale"%env
|
|
95
95
|
body = {
|
|
96
96
|
"platform": platform,
|
|
97
97
|
"type": 1,
|
|
@@ -146,10 +146,10 @@ def search_oa_gift(data):
|
|
|
146
146
|
"""
|
|
147
147
|
env = data["env"]
|
|
148
148
|
headers = data["headers"]
|
|
149
|
-
url = "%s/
|
|
149
|
+
url = "%s/admin/api/bff-web/live/sale/718581/product/gift/list?pageNum=1&pageSize=10" % env
|
|
150
150
|
params = {"page":1}
|
|
151
151
|
response = requests.get(url,headers=headers,params=params).json()
|
|
152
|
-
items = response["data"]["
|
|
152
|
+
items = response["data"]["list"]
|
|
153
153
|
|
|
154
154
|
if items == []:
|
|
155
155
|
# 新增赠品
|
|
@@ -159,7 +159,7 @@ def search_oa_gift(data):
|
|
|
159
159
|
time.sleep(5)
|
|
160
160
|
#新增后去查询
|
|
161
161
|
response = requests.get(url, headers=headers, params=params).json()
|
|
162
|
-
items = response["data"]["
|
|
162
|
+
items = response["data"]["list"]
|
|
163
163
|
|
|
164
164
|
# 返回赠品数量不是0
|
|
165
165
|
# print(json.dumps(items))
|
|
@@ -168,6 +168,7 @@ def search_oa_gift(data):
|
|
|
168
168
|
for a,b in enumerate(quantityList):
|
|
169
169
|
if b!=0:
|
|
170
170
|
gift_info = items[a]
|
|
171
|
+
break
|
|
171
172
|
# 下划线命名转变为驼峰命名
|
|
172
173
|
change_dict_into_hump(gift_info)
|
|
173
174
|
|
|
@@ -234,7 +235,7 @@ def create_post_lucky_draw(data):
|
|
|
234
235
|
title = data["title"]
|
|
235
236
|
body = {"title":title,"activityType":"LUCKY_DRAW","platforms":
|
|
236
237
|
[platform],"timeZone":"Asia/Shanghai"}
|
|
237
|
-
url = "%s/api/
|
|
238
|
+
url = "%s/admin/api/bff-web/post/activity/sale"%env
|
|
238
239
|
count = 0
|
|
239
240
|
while True:
|
|
240
241
|
try:
|
|
@@ -346,7 +347,7 @@ def modify_lucky_draw(data):
|
|
|
346
347
|
sales_id = data["sales_id"]
|
|
347
348
|
else:
|
|
348
349
|
sales_id,__ = create_post_lucky_draw(data)
|
|
349
|
-
url = "%s/api/
|
|
350
|
+
url = "%s/admin/api/bff-web/post/sale/%s"%(env, sales_id)
|
|
350
351
|
response = requests.put(url,headers=headers,json=body).json()
|
|
351
352
|
return sales_id,response
|
|
352
353
|
|
|
@@ -362,7 +363,7 @@ def get_channel_info(data):
|
|
|
362
363
|
if "platform" in data:
|
|
363
364
|
platform = data["platform"].upper()
|
|
364
365
|
# platform = data["platform"]
|
|
365
|
-
url = "%s/api/
|
|
366
|
+
url = "%s/admin/api/bff-web/live/channels?platform=%s"%(env,platform)
|
|
366
367
|
res = requests.get(url, headers=headers).json()
|
|
367
368
|
page_id = res["data"][0]["platformChannelId"]
|
|
368
369
|
page_name = res["data"][0]["platformChannelName"]
|
|
@@ -417,7 +418,7 @@ def get_page_post(data):
|
|
|
417
418
|
if "page_size" in data:
|
|
418
419
|
page_size = data
|
|
419
420
|
params = {"page_size":page_size,"type":type,"since":since,"party_channel_id":page_id,"platform":platform}
|
|
420
|
-
url = "%s/api/
|
|
421
|
+
url = "%s/admin/api/bff-web/post/facebook/list"%env
|
|
421
422
|
print("params",params)
|
|
422
423
|
response =requests.get(url,headers=headers,params=params).json()
|
|
423
424
|
return response
|
|
@@ -435,7 +436,7 @@ def relate_post(data):
|
|
|
435
436
|
sales_id = data["sales_id"]
|
|
436
437
|
if "platform" in data:
|
|
437
438
|
platform = data["platform"].upper()
|
|
438
|
-
url = "%s/api/
|
|
439
|
+
url = "%s/admin/api/bff-web/post/sale/%s/related-post"%(env,sales_id)
|
|
439
440
|
body = {}
|
|
440
441
|
if platform=="FB_GROUP":
|
|
441
442
|
page_id = data["page_id"]
|
|
@@ -492,7 +493,7 @@ def create_fb_text_post(data):
|
|
|
492
493
|
postDescription = data["postDescription"]
|
|
493
494
|
if platform == "FB_GROUP":
|
|
494
495
|
page_id = group_id
|
|
495
|
-
url = "%s/api/
|
|
496
|
+
url = "%s/admin/api/bff-web/post/facebook/list/%s/post"%(env,sales_id)
|
|
496
497
|
body = {"postDescription":postDescription,"platform":platform,
|
|
497
498
|
"url":[],"mediaFbid":[],"pageId":page_id}
|
|
498
499
|
response = requests.post(url,headers=headers,json=body).json()
|
|
@@ -515,10 +516,10 @@ def search_post_product(data):
|
|
|
515
516
|
type = data["type"]
|
|
516
517
|
if "quantity" in data:
|
|
517
518
|
quantity = data["quantity"]
|
|
518
|
-
url = "%s/api/
|
|
519
|
+
url = "%s/admin/api/bff-web/keyword/product/spu/list?page=1&searchType=ALL&pageSize=10"%(env)
|
|
519
520
|
if "query" in data:
|
|
520
521
|
query = data["query"]
|
|
521
|
-
url = "%s/api/
|
|
522
|
+
url = "%s/admin/api/bff-web/keyword/product/spu/list?page=1&searchType=ALL&pageSize=10&query=%s" % (env, query)
|
|
522
523
|
response = requests.get(url, headers=headers).json()
|
|
523
524
|
items = response["data"]["openApiProductDetails"]
|
|
524
525
|
# productSpuKeyVos = response["data"]["productSpuKeyVos"][0]
|
|
@@ -577,7 +578,7 @@ def model_one_add_product(data):
|
|
|
577
578
|
env = data["env"]
|
|
578
579
|
headers = data["headers"]
|
|
579
580
|
sales_id = data["sales_id"]
|
|
580
|
-
url = "%s/api/
|
|
581
|
+
url = "%s/admin/api/bff-web/post/sale/%s/sale_list/product"%(env,sales_id)
|
|
581
582
|
spu_id, sku_id, sku_id_quantity, product_info = search_post_product(data)
|
|
582
583
|
# print("sku_id",sku_id)
|
|
583
584
|
skuList = []
|
|
@@ -611,7 +612,7 @@ def model_four_add_product(data):
|
|
|
611
612
|
env = data["env"]
|
|
612
613
|
headers = data["headers"]
|
|
613
614
|
sales_id = data["sales_id"]
|
|
614
|
-
url = "%s/api/
|
|
615
|
+
url = "%s/admin/api/bff-web/post/sale/%s/sale_list/product"%(env,sales_id)
|
|
615
616
|
spu_id, sku_id, sku_id_quantity, product_info = search_post_product(data)
|
|
616
617
|
skuList = []
|
|
617
618
|
if len(sku_id) >1:
|
|
@@ -650,7 +651,7 @@ def modify_post_schedule(data):
|
|
|
650
651
|
start_time = data["start_time"]*1000 if len(str(data["start_time"]))<13 else data["start_time"]
|
|
651
652
|
if "end_time" in data:
|
|
652
653
|
end_time = data["end_time"] * 1000 if len(str(data["end_time"])) < 13 else data["end_time"]
|
|
653
|
-
url = "%s/api/
|
|
654
|
+
url = "%s/admin/api/bff-web/post/sale/%s/schedule"%(env,sales_id)
|
|
654
655
|
body = {"start_time": start_time, "end_time": end_time}
|
|
655
656
|
response = requests.put(url,headers=headers,json=body).json()
|
|
656
657
|
return response
|
|
@@ -662,7 +663,7 @@ def publish_post(data):
|
|
|
662
663
|
sales_id = data["sales_id"]
|
|
663
664
|
#启用前先修改排程时间,若没有传时间,则按默认值设置
|
|
664
665
|
modify_post_schedule(data)
|
|
665
|
-
url = "%s/api/
|
|
666
|
+
url = "%s/admin/api/bff-web/post/sale/%s/publish"%(env,sales_id)
|
|
666
667
|
response = requests.put(url, headers=headers).json()
|
|
667
668
|
return response
|
|
668
669
|
|
|
@@ -675,7 +676,8 @@ def end_post_activity(data):
|
|
|
675
676
|
env = data["env"]
|
|
676
677
|
headers = data["headers"]
|
|
677
678
|
sales_id = data["sales_id"]
|
|
678
|
-
url = "%s/api/posts/activity/end/%s"%(env,sales_id)
|
|
679
|
+
# url = "%s/api/posts/activity/end/%s"%(env,sales_id)
|
|
680
|
+
url= "%s/admin/api/bff-web/post/sale/%s/activity/end"%(env,sales_id)
|
|
679
681
|
response = requests.put(url,headers=headers).json()
|
|
680
682
|
return response
|
|
681
683
|
|
|
@@ -688,7 +690,8 @@ def get_post_activity_winner(data):
|
|
|
688
690
|
env = data["env"]
|
|
689
691
|
headers = data["headers"]
|
|
690
692
|
sales_id = data["sales_id"]
|
|
691
|
-
url = "%s/api/posts/activity/listWinner/%s?limit=1000"%(env,sales_id)
|
|
693
|
+
# url = "%s/api/posts/activity/listWinner/%s?limit=1000"%(env,sales_id)
|
|
694
|
+
url = "%s/admin/api/bff-web/post/sale/%s/activity/winners?limit=1000"%(env,sales_id)
|
|
692
695
|
response = requests.get(url,headers=headers).json()
|
|
693
696
|
return response
|
|
694
697
|
|
|
@@ -702,7 +705,7 @@ def get_post_info(data):
|
|
|
702
705
|
env = data["env"]
|
|
703
706
|
headers = data["headers"]
|
|
704
707
|
sales_id = data["sales_id"]
|
|
705
|
-
url = "%s/api/
|
|
708
|
+
url = "%s/admin/api/bff-web/post/sales/%s?fieldScopes=DETAILS,PRODUCT_NUM," \
|
|
706
709
|
"SALES_CONFIG,LOCK_INVENTORY,PRODUCT_LIST"%(env,sales_id)
|
|
707
710
|
response = requests.get(url, headers=headers).json()
|
|
708
711
|
return response
|
|
@@ -711,7 +714,7 @@ def get_post_activity_detail(data):
|
|
|
711
714
|
env = data["env"]
|
|
712
715
|
headers = data["headers"]
|
|
713
716
|
sales_id = data["sales_id"]
|
|
714
|
-
url = "%s/api/
|
|
717
|
+
url = "%s/admin/api/bff-web/post/sale/%s/activity/detail"%(env,sales_id)
|
|
715
718
|
response = requests.get(url, headers=headers).json()
|
|
716
719
|
return response
|
|
717
720
|
|
|
@@ -728,7 +731,7 @@ def get_post_list(data):
|
|
|
728
731
|
if "sales_type" in data:
|
|
729
732
|
sales_type = data["sales_type"]
|
|
730
733
|
params = {"page_num":1,"page_size":10,"sales_type":sales_type}
|
|
731
|
-
url = "%s/api/
|
|
734
|
+
url = "%s/admin/api/bff-web/post/sales"%env
|
|
732
735
|
response = requests.get(url,headers=headers,params=params).json()
|
|
733
736
|
return response
|
|
734
737
|
|
|
@@ -738,7 +741,7 @@ def get_post_product_keyword(data):
|
|
|
738
741
|
env = data["env"]
|
|
739
742
|
headers = data["headers"]
|
|
740
743
|
sales_id = data["sales_id"]
|
|
741
|
-
url = "%s/api/
|
|
744
|
+
url = "%s/admin/api/bff-web/post/sales/%s?fieldScopes=PRODUCT_LIST" % (env, sales_id)
|
|
742
745
|
response = requests.get(url, headers=headers).json()
|
|
743
746
|
keyword = jsonpath(response,"$..custom_keys_label_str")[0]
|
|
744
747
|
return keyword,response
|
|
@@ -880,7 +883,7 @@ def get_comment_user(data):
|
|
|
880
883
|
if "query" in data:
|
|
881
884
|
query = data["query"]
|
|
882
885
|
params["query"] = query
|
|
883
|
-
url = "%s/api/
|
|
886
|
+
url = "%s/admin/api/bff-web/post/comments"%env
|
|
884
887
|
# print(params)
|
|
885
888
|
response = requests.get(url, headers=headers,params=params).json()
|
|
886
889
|
print(response)
|
|
@@ -897,7 +900,7 @@ def post_edit_cart(data):
|
|
|
897
900
|
headers = data["headers"]
|
|
898
901
|
sales_id = data["sales_id"]
|
|
899
902
|
post_user_id, __ = get_comment_user(data)
|
|
900
|
-
url = "%s/api/
|
|
903
|
+
url = "%s/admin/api/bff-web/post/sale/%s/user/" \
|
|
901
904
|
"%s/cart/item?skip_reapply_promotion=false"%(env,sales_id,post_user_id)
|
|
902
905
|
response = search_oa_product(data)
|
|
903
906
|
variations = response["data"]["items"][0]["variations"]
|
|
@@ -1216,7 +1219,7 @@ def delete_post(data):
|
|
|
1216
1219
|
env = data["env"]
|
|
1217
1220
|
headers = data["headers"]
|
|
1218
1221
|
sales_id = data["sales_id"]
|
|
1219
|
-
url = "%s/api/
|
|
1222
|
+
url = "%s/admin/api/bff-web/post/sales/%s"%(env,sales_id)
|
|
1220
1223
|
res = requests.delete(url, headers=headers).json()
|
|
1221
1224
|
return res
|
|
1222
1225
|
|
|
@@ -1231,8 +1234,7 @@ def modelone_create_single_product(data):
|
|
|
1231
1234
|
sales_id = data["sales_id"]
|
|
1232
1235
|
quantity = 1000
|
|
1233
1236
|
price = 3
|
|
1234
|
-
keyword_type = "customKey"
|
|
1235
|
-
keyword_type = data["keyword_type"]
|
|
1237
|
+
keyword_type = data.get("keyword_type","customKey")
|
|
1236
1238
|
|
|
1237
1239
|
if "quantity" in data:
|
|
1238
1240
|
quantity = data["quantity"]
|
|
@@ -1424,14 +1426,14 @@ def get_post_product_comment(data):
|
|
|
1424
1426
|
env = data["env"]
|
|
1425
1427
|
headers = data["headers"]
|
|
1426
1428
|
sales_id = data["sales_id"]
|
|
1427
|
-
url = "%s/api/
|
|
1429
|
+
url = "%s/admin/api/bff-web/post/sale/%s/product-msg/preview"%(env,sales_id)
|
|
1428
1430
|
|
|
1429
1431
|
def modify_message(data):
|
|
1430
1432
|
env = data["env"]
|
|
1431
1433
|
headers = data["headers"]
|
|
1432
1434
|
sales_id = data["sales_id"]
|
|
1433
1435
|
|
|
1434
|
-
url = "%s/api/
|
|
1436
|
+
url = "%s/admin/api/bff-web/post/sale/%s/config/keyword_message"%(env,sales_id)
|
|
1435
1437
|
need_send_message = True
|
|
1436
1438
|
if "need_send_message" in data:
|
|
1437
1439
|
need_send_message = data["need_send_message"]
|
|
@@ -1492,7 +1494,7 @@ def modify_post_general_config(data):
|
|
|
1492
1494
|
"""
|
|
1493
1495
|
env = data["env"]
|
|
1494
1496
|
headers = data["headers"]
|
|
1495
|
-
url = "%s/api/
|
|
1497
|
+
url = "%s/admin/api/bff-web/post/config/global/POST" % env
|
|
1496
1498
|
patternModel = "INCLUDE_MATCH"
|
|
1497
1499
|
#下单模式
|
|
1498
1500
|
if "patternModel" in data:
|
|
@@ -1566,7 +1568,7 @@ def copy_post(data):
|
|
|
1566
1568
|
env = data["env"]
|
|
1567
1569
|
headers = data["headers"]
|
|
1568
1570
|
sales_id = data["sales_id"]
|
|
1569
|
-
url = "%s/api/
|
|
1571
|
+
url = "%s/admin/api/bff-web/post/sale/%s/copy"%(env,sales_id)
|
|
1570
1572
|
response = requests.post(url,headers=headers).json()
|
|
1571
1573
|
sales_id = response["data"]["id"]
|
|
1572
1574
|
return sales_id,response
|
|
@@ -1580,7 +1582,7 @@ def end_post(data):
|
|
|
1580
1582
|
env = data["env"]
|
|
1581
1583
|
headers = data["headers"]
|
|
1582
1584
|
sales_id = data["sales_id"]
|
|
1583
|
-
url = "%s/api/
|
|
1585
|
+
url = "%s/admin/api/bff-web/post/sale/%s/disconnect"%(env,sales_id)
|
|
1584
1586
|
response = requests.put(url,headers=headers).json()
|
|
1585
1587
|
return response
|
|
1586
1588
|
|
|
@@ -1681,7 +1683,7 @@ def edit_message(data):
|
|
|
1681
1683
|
env = data["env"]
|
|
1682
1684
|
headers = data["headers"]
|
|
1683
1685
|
sales_id = data["sales_id"]
|
|
1684
|
-
url = "%s/api/
|
|
1686
|
+
url = "%s/admin/api/bff-web/post/sale/%s/config/keyword_message" % (env,sales_id)
|
|
1685
1687
|
has_interaction_message = "您好,以下商品加单成功!购物车商品总金额: 请按以下按钮结账%d" % int(time.time())
|
|
1686
1688
|
no_interaction_message_first = "您好,以下商品加单成功 !购物车商品总金额: 请按以下按钮继续」%d" % int(time.time())
|
|
1687
1689
|
second_message = "您好,以下商品加单成功!{products} 购物车商品总金额: {total}请前往购物网站!%d" % int(time.time())
|
|
File without changes
|
{sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc_common_interface-3.2.3 → sc_common_interface-3.2.5}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|