sc-common-interface 2.5.4__tar.gz → 2.5.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-2.5.4 → sc-common-interface-2.5.5}/PKG-INFO +1 -1
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface/LiveCommonInterface.py +36 -19
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/setup.py +1 -1
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface/McCommonInterface.py +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface/Platform.py +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/setup.cfg +0 -0
{sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -1496,21 +1496,38 @@ 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
|
+
return keyword, product_id, list_data
|
|
1515
|
+
elif type=="out":
|
|
1516
|
+
for i in list_data:
|
|
1517
|
+
combinationList = i["combinationList"]
|
|
1518
|
+
for combination in combinationList:
|
|
1519
|
+
products = combination["products"]
|
|
1520
|
+
for product in products:
|
|
1521
|
+
count = product["count"]
|
|
1522
|
+
quantity = product["quantity"]
|
|
1523
|
+
if quantity != -1 and quantity < count:
|
|
1524
|
+
keyword = combination["keywords"][0]
|
|
1525
|
+
product_id = i["id"]
|
|
1526
|
+
return keyword, product_id, list_data
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
|
|
1514
1531
|
|
|
1515
1532
|
if __name__=="__main__":
|
|
1516
1533
|
data = {
|
|
@@ -1553,7 +1570,7 @@ if __name__=="__main__":
|
|
|
1553
1570
|
"skuId": "673c311f52b9d659d30bf878",
|
|
1554
1571
|
"count": 2,
|
|
1555
1572
|
"name": "inbox自定义商品",
|
|
1556
|
-
"quantity": 1,
|
|
1573
|
+
"quantity": -1,
|
|
1557
1574
|
"unlimitedQuantity": True
|
|
1558
1575
|
},
|
|
1559
1576
|
{
|
|
@@ -1561,7 +1578,7 @@ if __name__=="__main__":
|
|
|
1561
1578
|
"skuId": "673c2e5a3dc982185de87b57",
|
|
1562
1579
|
"count": 2,
|
|
1563
1580
|
"name": "自定义商品哈哈哈",
|
|
1564
|
-
"quantity":
|
|
1581
|
+
"quantity": 9999,
|
|
1565
1582
|
"unlimitedQuantity": True
|
|
1566
1583
|
}
|
|
1567
1584
|
],
|
|
@@ -1622,7 +1639,7 @@ if __name__=="__main__":
|
|
|
1622
1639
|
{
|
|
1623
1640
|
"spuId": "670f84314149e400117b3c6a",
|
|
1624
1641
|
"skuId": "670f84314bd7dd001035d0ea",
|
|
1625
|
-
"count":
|
|
1642
|
+
"count": 51,
|
|
1626
1643
|
"name": "多规格商品名称1729070129(红)",
|
|
1627
1644
|
"quantity": 50,
|
|
1628
1645
|
"unlimitedQuantity": True
|
|
@@ -1811,5 +1828,5 @@ if __name__=="__main__":
|
|
|
1811
1828
|
},
|
|
1812
1829
|
"traceId": "13f3a0b22dc91017817f0f74756031cf"
|
|
1813
1830
|
}
|
|
1814
|
-
keyword,spuid,__ = get_stock_product_set(data)
|
|
1831
|
+
keyword,spuid,__ = get_stock_product_set(data,"out")
|
|
1815
1832
|
print(keyword)
|
{sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/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.5}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.5.4 → sc-common-interface-2.5.5}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|