sc-common-interface 2.4.1__tar.gz → 2.4.2__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-2.4.1 → sc-common-interface-2.4.2}/PKG-INFO +1 -1
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface/LiveCommonInterface.py +80 -20
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/setup.py +1 -1
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface/McCommonInterface.py +0 -0
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface/Platform.py +0 -0
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/setup.cfg +0 -0
{sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -413,7 +413,67 @@ def create_live(data):
|
|
|
413
413
|
platform = "FB_GROUP"
|
|
414
414
|
if "platform" in data:
|
|
415
415
|
platform = data["platform"]
|
|
416
|
-
|
|
416
|
+
patternModel = "INCLUDE_MATCH"
|
|
417
|
+
if "patternModel" in data:
|
|
418
|
+
patternModel = data["patternModel"]
|
|
419
|
+
keywordValidInLive = True
|
|
420
|
+
keywordValidAfterLive =False
|
|
421
|
+
if "keywordValidInLive" in data:
|
|
422
|
+
keywordValidInLive = data["keywordValidInLive"]
|
|
423
|
+
if "keywordValidAfterLive" in data:
|
|
424
|
+
keywordValidAfterLive = data["keywordValidAfterLive"]
|
|
425
|
+
autoNotifyPayEnable = False
|
|
426
|
+
autoNotifyPayMessage = ""
|
|
427
|
+
autoNotifyPayButton = ""
|
|
428
|
+
if "autoNotifyPayEnable" in data:
|
|
429
|
+
autoNotifyPayEnable = data["autoNotifyPayEnable"]
|
|
430
|
+
if "autoNotifyPayMessage" in data:
|
|
431
|
+
autoNotifyPayMessage = data["autoNotifyPayMessage"]
|
|
432
|
+
if "autoNotifyPayButton" in data:
|
|
433
|
+
autoNotifyPayButton = data["autoNotifyPayButton"]
|
|
434
|
+
stockEnable = False
|
|
435
|
+
stockIime = None
|
|
436
|
+
if "stockEnable" in data:
|
|
437
|
+
stockEnable = data["stockEnable"]
|
|
438
|
+
if "stockIime" in data:
|
|
439
|
+
stockIime = data["stockIime"]
|
|
440
|
+
lowOfQuantityEnable = False
|
|
441
|
+
lowOfQuantitySound = False
|
|
442
|
+
lowOfQuantityQuantity = "1"
|
|
443
|
+
if "lowOfQuantityEnable" in data:
|
|
444
|
+
lowOfQuantityEnable = data["lowOfQuantityEnable"]
|
|
445
|
+
if "lowOfQuantitySound" in data:
|
|
446
|
+
lowOfQuantitySound = data["lowOfQuantitySound"]
|
|
447
|
+
if "lowOfQuantityQuantity" in data:
|
|
448
|
+
lowOfQuantityQuantity = data["lowOfQuantityQuantity"]
|
|
449
|
+
|
|
450
|
+
has_interaction_message = ""
|
|
451
|
+
has_interaction_message_button = ""
|
|
452
|
+
no_interaction_message_first = ""
|
|
453
|
+
second_message = ""
|
|
454
|
+
first_message_button = ""
|
|
455
|
+
second_message_button = " ️"
|
|
456
|
+
need_send_message = True
|
|
457
|
+
# message_button = "立即结帐️"
|
|
458
|
+
has_link = True
|
|
459
|
+
if "has_interaction_message" in data:
|
|
460
|
+
has_interaction_message = data["has_interaction_message"]
|
|
461
|
+
if "has_interaction_message_button" in data:
|
|
462
|
+
has_interaction_message_button = data["has_interaction_message_button"]
|
|
463
|
+
if "no_interaction_message_first" in data:
|
|
464
|
+
no_interaction_message_first = data["no_interaction_message_first"]
|
|
465
|
+
if "first_message_button" in data:
|
|
466
|
+
first_message_button = data["first_message_button"]
|
|
467
|
+
if "second_message" in data:
|
|
468
|
+
second_message = data["second_message"]
|
|
469
|
+
if "second_message_button" in data:
|
|
470
|
+
second_message_button = data["second_message_button"]
|
|
471
|
+
if "need_send_message" in data:
|
|
472
|
+
need_send_message = data["need_send_message"]
|
|
473
|
+
# if "message_button" in data:
|
|
474
|
+
# message_button = data["message_button"]
|
|
475
|
+
if "has_link" in data:
|
|
476
|
+
has_link = data["has_link"]
|
|
417
477
|
body = {
|
|
418
478
|
"sales": {
|
|
419
479
|
"title": title,
|
|
@@ -426,45 +486,45 @@ def create_live(data):
|
|
|
426
486
|
},
|
|
427
487
|
"salesConfig": {
|
|
428
488
|
"patternModel": {
|
|
429
|
-
"patternModel":
|
|
430
|
-
"keywordValidInLive":
|
|
431
|
-
"keywordValidAfterLive":
|
|
489
|
+
"patternModel": patternModel,
|
|
490
|
+
"keywordValidInLive": keywordValidInLive,
|
|
491
|
+
"keywordValidAfterLive": keywordValidAfterLive
|
|
432
492
|
},
|
|
433
493
|
"autoNotifyPay": {
|
|
434
|
-
"enable":
|
|
435
|
-
"message":
|
|
436
|
-
"button":
|
|
494
|
+
"enable": autoNotifyPayEnable,
|
|
495
|
+
"message": autoNotifyPayMessage,
|
|
496
|
+
"button": autoNotifyPayButton
|
|
437
497
|
},
|
|
438
498
|
"stock": {
|
|
439
|
-
"lockStock":
|
|
440
|
-
"salesStockLockExpireTime":
|
|
499
|
+
"lockStock": stockEnable,
|
|
500
|
+
"salesStockLockExpireTime": stockIime
|
|
441
501
|
},
|
|
442
502
|
"lowOfQuantity": {
|
|
443
|
-
"enable":
|
|
444
|
-
"sound":
|
|
445
|
-
"quantity":
|
|
503
|
+
"enable": lowOfQuantityEnable,
|
|
504
|
+
"sound": lowOfQuantitySound,
|
|
505
|
+
"quantity": lowOfQuantityQuantity
|
|
446
506
|
}
|
|
447
507
|
},
|
|
448
508
|
"postConfigMap": {
|
|
449
509
|
platform: {
|
|
450
510
|
"message": {
|
|
451
|
-
"needSendMessage":
|
|
511
|
+
"needSendMessage": need_send_message,
|
|
452
512
|
"hasInteractionMessage": {
|
|
453
513
|
"firstMessageTemplate": {
|
|
454
|
-
"topMessage":
|
|
514
|
+
"topMessage": has_interaction_message
|
|
455
515
|
},
|
|
456
|
-
"messageButton":
|
|
516
|
+
"messageButton": has_interaction_message_button
|
|
457
517
|
},
|
|
458
|
-
"hasLink":
|
|
518
|
+
"hasLink": has_link,
|
|
459
519
|
"noInteractionMessage": {
|
|
460
520
|
"firstMessageTemplate": {
|
|
461
|
-
"topMessage":
|
|
521
|
+
"topMessage": no_interaction_message_first
|
|
462
522
|
},
|
|
463
|
-
"firstMessageButton":
|
|
523
|
+
"firstMessageButton": first_message_button,
|
|
464
524
|
"secondMessageTemplate": {
|
|
465
|
-
"topMessage":
|
|
525
|
+
"topMessage": second_message
|
|
466
526
|
},
|
|
467
|
-
"secondMessageButton":
|
|
527
|
+
"secondMessageButton": second_message_button
|
|
468
528
|
},
|
|
469
529
|
"messageType": "MESSAGE"
|
|
470
530
|
}
|
{sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.4.1 → sc-common-interface-2.4.2}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|