sc-common-interface 2.5.7__tar.gz → 2.5.8__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.5.7
3
+ Version: 2.5.8
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -1004,7 +1004,7 @@ def edit_live_info(data):
1004
1004
  "salesOwner": salesOwner,
1005
1005
  "salesDescription": salesDescription,
1006
1006
  "platforms": [
1007
- platform
1007
+ platform.upper()
1008
1008
  ],
1009
1009
  "platformSubType": "",
1010
1010
  "platformChannels": platformChannels,
@@ -1114,6 +1114,7 @@ def edit_live_info(data):
1114
1114
  }
1115
1115
  }
1116
1116
  }
1117
+ print(body)
1117
1118
  response = requests.put(url, headers=headers, json=body).json()
1118
1119
  return response
1119
1120
 
@@ -1507,7 +1508,7 @@ def get_stock_product_set(res,type="stock"):
1507
1508
  if quantity==-1:
1508
1509
  # print("库存无限数量")
1509
1510
  pass
1510
- elif quantity<count:
1511
+ elif quantity>count:
1511
1512
  break
1512
1513
  keyword = combination["keywords"][0]
1513
1514
  product_id = i["id"]
@@ -1549,6 +1550,339 @@ def change_product_set_keyword_status(data):
1549
1550
 
1550
1551
 
1551
1552
  if __name__=="__main__":
1552
- data = {'headers': {'authorization': 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIzN2Y2MjY2M2IyMTI1MjIzMWZlMTc4MTE2ODhkNDliYSIsImRhdGEiOnsibWVyY2hhbnRfaWQiOiI2MjI5YTdiYWVhNzA2NDJhOGI2NWViZGEiLCJhcHBsaWNhdGlvbl9pZCI6IjYwZWVjNWViZjhkYzkyMDAwNjUyZTAwNiJ9LCJpc3MiOiJodHRwczovL2RldmVsb3BlcnMteXkuc2hvcGxpbmVzdGcuY29tIiwiYXVkIjpbXSwic3ViIjoiNjIyOWE3YmFlYTcwNjQyYThiNjVlYmRhIn0.FwtntG1dAYWNUcEZf6WSehXQveEw_rvTSGPEM3xV9FA', 'lang': 'en', 'Content-Type': 'application/json'}, 'product_id': '66f413a8f1e8240039b7bdf6', 'env': 'https://front-service.shoplinestg.com', 'sales_id': '67088', 'key': '4f6b54deff90cdc9966cbe7b82731b3b'}
1553
- res = change_product_set_keyword_status(data)
1554
- print(res)
1553
+ data = {
1554
+ "success": True,
1555
+ "code": "SUCCESS",
1556
+ "message": "success",
1557
+ "data": {
1558
+ "pageInfo": {
1559
+ "pageNum": 1,
1560
+ "pageSize": 10,
1561
+ "total": 5,
1562
+ "lastPage": True
1563
+ },
1564
+ "list": [
1565
+ {
1566
+ "id": "6741acc0cfda6a000ead3544",
1567
+ "image": "https://shoplineimg.com/61a87c9763b70c005106fbd0/6741acb473b250000b26861a/50xf.webp?source_format=jpeg\u0026cheap_resize=1",
1568
+ "title": "无库存组合商品",
1569
+ "recommend": {
1570
+ "isActivity": True,
1571
+ "recommendTime": True
1572
+ },
1573
+ "effectiveKey": True,
1574
+ "defaultKey": "",
1575
+ "combinationList": [
1576
+ {
1577
+ "id": "943947ecdfff37355535ecea0bd17c11",
1578
+ "price": {
1579
+ "originCents": 900,
1580
+ "origin": "900 ₫",
1581
+ "salesCents": 500,
1582
+ "sales": "500 ₫"
1583
+ },
1584
+ "keywords": [
1585
+ "组合商品关键字1732366855"
1586
+ ],
1587
+ "products": [
1588
+ {
1589
+ "spuId": "674153b778cb880011e7dc9b",
1590
+ "skuId": "674153b778cb880011e7dc9b",
1591
+ "count": 2,
1592
+ "name": "商品名称1732334518",
1593
+ "quantity": 99,
1594
+ "unlimitedQuantity": True
1595
+ },
1596
+ {
1597
+ "spuId": "65e855cbaf49be000ee315a9",
1598
+ "skuId": "65e855cbaf49be000ee315a9",
1599
+ "count": 2,
1600
+ "name": "无库存商品(不要删除)",
1601
+ "quantity": 0,
1602
+ "unlimitedQuantity": True
1603
+ }
1604
+ ],
1605
+ "buyerProductCount": 0
1606
+ }
1607
+ ],
1608
+ "availableStartTime": True,
1609
+ "availableEndTime": True,
1610
+ "tempPrice": {
1611
+ "originCents": 900,
1612
+ "origin": "900 ₫",
1613
+ "salesCents": 500,
1614
+ "sales": "500 ₫"
1615
+ },
1616
+ "childrenInfo": {
1617
+ "65e855cbaf49be000ee315a9": {
1618
+ "necessaryQuantity": 2,
1619
+ "variations": []
1620
+ },
1621
+ "674153b778cb880011e7dc9b": {
1622
+ "necessaryQuantity": 2,
1623
+ "variations": []
1624
+ }
1625
+ },
1626
+ "status": "active"
1627
+ },
1628
+ {
1629
+ "id": "670fbd3dac9b6acdb37c8192",
1630
+ "image": "https://shoplineimg.com/61a87c9763b70c005106fbd0/670fbd1fac9b6a65377c874a/50xf.webp?source_format=jpeg\u0026cheap_resize=1",
1631
+ "title": "dyy组合商品变动-子商品从无规格变成多规格",
1632
+ "recommend": {
1633
+ "isActivity": True,
1634
+ "recommendTime": "2024-11-23T20:26:54+08:00"
1635
+ },
1636
+ "effectiveKey": True,
1637
+ "defaultKey": "C",
1638
+ "combinationList": [
1639
+ {
1640
+ "id": "fc37396e6a9d294cec87752911092300",
1641
+ "price": {
1642
+ "originCents": 222,
1643
+ "origin": "222 ₫",
1644
+ "salesCents": 90,
1645
+ "sales": "90 ₫"
1646
+ },
1647
+ "keywords": [
1648
+ "C1"
1649
+ ],
1650
+ "products": [
1651
+ {
1652
+ "spuId": "670fbced7fb2d151ef8f665a",
1653
+ "skuId": "670fc098b34584000d03a595",
1654
+ "count": 2,
1655
+ "name": "dyy商品从无规格变成多规格(蓝)",
1656
+ "quantity": -1,
1657
+ "unlimitedQuantity": True
1658
+ },
1659
+ {
1660
+ "spuId": "670fbb5227a445000f12b050",
1661
+ "skuId": "670fbb517e0510001fd941c9",
1662
+ "count": 2,
1663
+ "name": "模式4接口自动化添加的多规格商品1729084241(红,M)",
1664
+ "quantity": 55,
1665
+ "unlimitedQuantity": True
1666
+ }
1667
+ ],
1668
+ "buyerProductCount": 1
1669
+ }
1670
+ ],
1671
+ "availableStartTime": True,
1672
+ "availableEndTime": True,
1673
+ "tempPrice": {
1674
+ "originCents": 222,
1675
+ "origin": "222 ₫",
1676
+ "salesCents": 90,
1677
+ "sales": "90 ₫"
1678
+ },
1679
+ "childrenInfo": {
1680
+ "670fbb5227a445000f12b050": {
1681
+ "necessaryQuantity": 2,
1682
+ "variations": [
1683
+ "670fbb517e0510001fd941c9",
1684
+ "670fbb517e0510001fd941ca",
1685
+ "670fbb517e0510001fd941cb",
1686
+ "670fbb517e0510001fd941cc"
1687
+ ]
1688
+ },
1689
+ "670fbced7fb2d151ef8f665a": {
1690
+ "necessaryQuantity": 2,
1691
+ "variations": [
1692
+ "670fc098b34584000d03a595",
1693
+ "670fc098b34584000d03a596"
1694
+ ]
1695
+ }
1696
+ },
1697
+ "status": "active"
1698
+ },
1699
+ {
1700
+ "id": "670f9464ac9b6ad8fd7c806b",
1701
+ "image": "https://shoplineimg.com/61a87c9763b70c005106fbd0/670f9448ac9b6ad4297c80df/50xf.webp?source_format=jpeg\u0026cheap_resize=1",
1702
+ "title": "dyy组合商品变动(子商品下的子规格被删除)0000",
1703
+ "recommend": {
1704
+ "isActivity": True,
1705
+ "recommendTime": True
1706
+ },
1707
+ "effectiveKey": True,
1708
+ "defaultKey": "B",
1709
+ "combinationList": [
1710
+ {
1711
+ "id": "b7d9e9e56797242331a71e39f5b8ed4b",
1712
+ "price": {
1713
+ "originCents": 100,
1714
+ "origin": "100 ₫",
1715
+ "salesCents": 90,
1716
+ "sales": "90 ₫"
1717
+ },
1718
+ "keywords": [
1719
+ "B1"
1720
+ ],
1721
+ "products": [
1722
+ {
1723
+ "spuId": "670f94397fb2d18edc8f61bc",
1724
+ "skuId": "670f9439a6ddbb00093ef3fa",
1725
+ "count": 2,
1726
+ "name": "dyy商品变动(子规格被删除)(紫色)",
1727
+ "quantity": -1,
1728
+ "unlimitedQuantity": True
1729
+ }
1730
+ ],
1731
+ "buyerProductCount": 0
1732
+ }
1733
+ ],
1734
+ "availableStartTime": True,
1735
+ "availableEndTime": True,
1736
+ "tempPrice": {
1737
+ "originCents": 100,
1738
+ "origin": "100 ₫",
1739
+ "salesCents": 90,
1740
+ "sales": "90 ₫"
1741
+ },
1742
+ "childrenInfo": {
1743
+ "670f94397fb2d18edc8f61bc": {
1744
+ "necessaryQuantity": 2,
1745
+ "variations": [
1746
+ "670f9439a6ddbb00093ef3fa"
1747
+ ]
1748
+ }
1749
+ },
1750
+ "status": "active"
1751
+ },
1752
+ {
1753
+ "id": "670f8a6c7fb2d15f7b8f6431",
1754
+ "image": "https://shoplineimg.com/61a87c9763b70c005106fbd0/670f8a57b7b2cb000a26a9f6/50xf.webp?source_format=jpeg\u0026cheap_resize=1",
1755
+ "title": "dyy超长的组合商品yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
1756
+ "recommend": {
1757
+ "isActivity": True,
1758
+ "recommendTime": True
1759
+ },
1760
+ "effectiveKey": True,
1761
+ "defaultKey": "A",
1762
+ "combinationList": [
1763
+ {
1764
+ "id": "c536c6eaffa7364a1dac2743aeff518a",
1765
+ "price": {
1766
+ "originCents": 100,
1767
+ "origin": "100 ₫",
1768
+ "salesCents": 90,
1769
+ "sales": "90 ₫"
1770
+ },
1771
+ "keywords": [
1772
+ "A1"
1773
+ ],
1774
+ "products": [
1775
+ {
1776
+ "spuId": "670f8a48b7b2cb384126a9bc",
1777
+ "skuId": "670f8a48db1762000bcedfc8",
1778
+ "count": 2,
1779
+ "name": "dyy超长的商品yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy(dyy超长的商品yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy)",
1780
+ "quantity": -1,
1781
+ "unlimitedQuantity": True
1782
+ },
1783
+ {
1784
+ "spuId": "670f84314149e400117b3c6a",
1785
+ "skuId": "670f84314bd7dd001035d0ea",
1786
+ "count": 1,
1787
+ "name": "多规格商品名称1729070129(红)",
1788
+ "quantity": 50,
1789
+ "unlimitedQuantity": True
1790
+ }
1791
+ ],
1792
+ "buyerProductCount": 0
1793
+ }
1794
+ ],
1795
+ "availableStartTime": True,
1796
+ "availableEndTime": True,
1797
+ "tempPrice": {
1798
+ "originCents": 100,
1799
+ "origin": "100 ₫",
1800
+ "salesCents": 90,
1801
+ "sales": "90 ₫"
1802
+ },
1803
+ "childrenInfo": {
1804
+ "670f84314149e400117b3c6a": {
1805
+ "necessaryQuantity": 1,
1806
+ "variations": [
1807
+ "670f84314bd7dd001035d0ea"
1808
+ ]
1809
+ },
1810
+ "670f8a48b7b2cb384126a9bc": {
1811
+ "necessaryQuantity": 2,
1812
+ "variations": [
1813
+ "670f8a48db1762000bcedfc8",
1814
+ "670f8a48db1762000bcedfc9"
1815
+ ]
1816
+ }
1817
+ },
1818
+ "status": "active"
1819
+ },
1820
+ {
1821
+ "id": "673c889f3dc982185de87d1c",
1822
+ "image": "https://shoplineimg.com/61a87c9763b70c005106fbd0/673c889b52b9d600110bfc1c/50xf.webp?source_format=png\u0026cheap_resize=1",
1823
+ "title": "ffsssdsfsfsf",
1824
+ "recommend": {
1825
+ "isActivity": True,
1826
+ "recommendTime": True
1827
+ },
1828
+ "effectiveKey": True,
1829
+ "defaultKey": "",
1830
+ "combinationList": [
1831
+ {
1832
+ "id": "46df6fa5b6af8bcbec7aa28db26f1eae",
1833
+ "price": {
1834
+ "originCents": 455,
1835
+ "origin": "455 ₫",
1836
+ "salesCents": 55,
1837
+ "sales": "55 ₫"
1838
+ },
1839
+ "keywords": [
1840
+ "厨房风格"
1841
+ ],
1842
+ "products": [
1843
+ {
1844
+ "spuId": "673c311f52b9d659d30bf878",
1845
+ "skuId": "673c311f52b9d659d30bf878",
1846
+ "count": 2,
1847
+ "name": "inbox自定义商品",
1848
+ "quantity": 999999,
1849
+ "unlimitedQuantity": True
1850
+ },
1851
+ {
1852
+ "spuId": "673c2e5a3dc982185de87b57",
1853
+ "skuId": "673c2e5a3dc982185de87b57",
1854
+ "count": 2,
1855
+ "name": "自定义商品哈哈哈",
1856
+ "quantity": -1,
1857
+ "unlimitedQuantity": True
1858
+ }
1859
+ ],
1860
+ "buyerProductCount": 0
1861
+ }
1862
+ ],
1863
+ "availableStartTime": True,
1864
+ "availableEndTime": True,
1865
+ "tempPrice": {
1866
+ "originCents": 455,
1867
+ "origin": "455 ₫",
1868
+ "salesCents": 55,
1869
+ "sales": "55 ₫"
1870
+ },
1871
+ "childrenInfo": {
1872
+ "673c2e5a3dc982185de87b57": {
1873
+ "necessaryQuantity": 2,
1874
+ "variations": []
1875
+ },
1876
+ "673c311f52b9d659d30bf878": {
1877
+ "necessaryQuantity": 2,
1878
+ "variations": []
1879
+ }
1880
+ },
1881
+ "status": "active"
1882
+ }
1883
+ ]
1884
+ },
1885
+ "traceId": "019833d17de727ab192e0fe3582c372e"
1886
+ }
1887
+ keyword, product_id,combination_id, __ = get_stock_product_set(data)
1888
+ print(keyword)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc-common-interface
3
- Version: 2.5.7
3
+ Version: 2.5.8
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.5.7',
5
+ version='2.5.8',
6
6
  description='SC贴文销售公用的接口',
7
7
  author='river',
8
8
  packages=find_packages(),