sc-common-interface 2.5.4__tar.gz → 2.5.6__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.5.4 → sc-common-interface-2.5.6}/PKG-INFO +1 -1
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface/LiveCommonInterface.py +39 -20
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/setup.py +1 -1
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface/McCommonInterface.py +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface/Platform.py +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/setup.cfg +0 -0
{sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -1496,21 +1496,40 @@ def get_sales_keyword(data):
|
|
|
1496
1496
|
|
|
1497
1497
|
def get_stock_product_set(res,type="stock"):
|
|
1498
1498
|
list_data = res["data"]["list"]
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1499
|
+
if type=="stock":
|
|
1500
|
+
for i in list_data:
|
|
1501
|
+
combinationList = i["combinationList"]
|
|
1502
|
+
for combination in combinationList:
|
|
1503
|
+
products = combination["products"]
|
|
1504
|
+
for product in products:
|
|
1505
|
+
count = product["count"]
|
|
1506
|
+
quantity = product["quantity"]
|
|
1507
|
+
if quantity==-1:
|
|
1508
|
+
# print("库存无限数量")
|
|
1509
|
+
pass
|
|
1510
|
+
elif quantity<count:
|
|
1511
|
+
break
|
|
1512
|
+
keyword = combination["keywords"][0]
|
|
1513
|
+
product_id = i["id"]
|
|
1514
|
+
combination_id = combination["id"]
|
|
1515
|
+
return keyword, product_id, combination_id
|
|
1516
|
+
elif type=="out":
|
|
1517
|
+
for i in list_data:
|
|
1518
|
+
combinationList = i["combinationList"]
|
|
1519
|
+
for combination in combinationList:
|
|
1520
|
+
products = combination["products"]
|
|
1521
|
+
for product in products:
|
|
1522
|
+
count = product["count"]
|
|
1523
|
+
quantity = product["quantity"]
|
|
1524
|
+
if quantity != -1 and quantity < count:
|
|
1525
|
+
keyword = combination["keywords"][0]
|
|
1526
|
+
product_id = i["id"]
|
|
1527
|
+
combination_id = combination["id"]
|
|
1528
|
+
return keyword, product_id, combination_id
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
|
|
1532
|
+
|
|
1514
1533
|
|
|
1515
1534
|
if __name__=="__main__":
|
|
1516
1535
|
data = {
|
|
@@ -1553,7 +1572,7 @@ if __name__=="__main__":
|
|
|
1553
1572
|
"skuId": "673c311f52b9d659d30bf878",
|
|
1554
1573
|
"count": 2,
|
|
1555
1574
|
"name": "inbox自定义商品",
|
|
1556
|
-
"quantity": 1,
|
|
1575
|
+
"quantity": -1,
|
|
1557
1576
|
"unlimitedQuantity": True
|
|
1558
1577
|
},
|
|
1559
1578
|
{
|
|
@@ -1561,7 +1580,7 @@ if __name__=="__main__":
|
|
|
1561
1580
|
"skuId": "673c2e5a3dc982185de87b57",
|
|
1562
1581
|
"count": 2,
|
|
1563
1582
|
"name": "自定义商品哈哈哈",
|
|
1564
|
-
"quantity":
|
|
1583
|
+
"quantity": 9999,
|
|
1565
1584
|
"unlimitedQuantity": True
|
|
1566
1585
|
}
|
|
1567
1586
|
],
|
|
@@ -1622,7 +1641,7 @@ if __name__=="__main__":
|
|
|
1622
1641
|
{
|
|
1623
1642
|
"spuId": "670f84314149e400117b3c6a",
|
|
1624
1643
|
"skuId": "670f84314bd7dd001035d0ea",
|
|
1625
|
-
"count":
|
|
1644
|
+
"count": 51,
|
|
1626
1645
|
"name": "多规格商品名称1729070129(红)",
|
|
1627
1646
|
"quantity": 50,
|
|
1628
1647
|
"unlimitedQuantity": True
|
|
@@ -1811,5 +1830,5 @@ if __name__=="__main__":
|
|
|
1811
1830
|
},
|
|
1812
1831
|
"traceId": "13f3a0b22dc91017817f0f74756031cf"
|
|
1813
1832
|
}
|
|
1814
|
-
keyword,spuid,
|
|
1815
|
-
print(
|
|
1833
|
+
keyword,spuid,combination_id = get_stock_product_set(data,"out")
|
|
1834
|
+
print(combination_id)
|
{sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.5.4 → sc-common-interface-2.5.6}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|