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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc-common-interface
3
- Version: 2.4.1
3
+ Version: 2.4.2
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -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": "INCLUDE_MATCH",
430
- "keywordValidInLive": False,
431
- "keywordValidAfterLive": False
489
+ "patternModel": patternModel,
490
+ "keywordValidInLive": keywordValidInLive,
491
+ "keywordValidAfterLive": keywordValidAfterLive
432
492
  },
433
493
  "autoNotifyPay": {
434
- "enable": False,
435
- "message": "",
436
- "button": ""
494
+ "enable": autoNotifyPayEnable,
495
+ "message": autoNotifyPayMessage,
496
+ "button": autoNotifyPayButton
437
497
  },
438
498
  "stock": {
439
- "lockStock": False,
440
- "salesStockLockExpireTime": None
499
+ "lockStock": stockEnable,
500
+ "salesStockLockExpireTime": stockIime
441
501
  },
442
502
  "lowOfQuantity": {
443
- "enable": True,
444
- "sound": False,
445
- "quantity": "1"
503
+ "enable": lowOfQuantityEnable,
504
+ "sound": lowOfQuantitySound,
505
+ "quantity": lowOfQuantityQuantity
446
506
  }
447
507
  },
448
508
  "postConfigMap": {
449
509
  platform: {
450
510
  "message": {
451
- "needSendMessage": True,
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": True,
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
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc-common-interface
3
- Version: 2.4.1
3
+ Version: 2.4.2
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='sc-common-interface',
5
- version='2.4.1',
5
+ version='2.4.2',
6
6
  description='SC贴文销售公用的接口',
7
7
  author='river',
8
8
  packages=find_packages(),