sc-common-interface 2.9.0__tar.gz → 2.9.1__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.9.0
3
+ Version: 2.9.1
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -239,7 +239,8 @@ def get_str_time(time_type="add",unit="days",num=1,format='%Y-%m-%dT%H:%M:%S.%f'
239
239
 
240
240
 
241
241
  if __name__=="__main__":
242
- pass
242
+ format_time = get_str_time(num=179,time_type="add")
243
+ print(format_time)
243
244
 
244
245
 
245
246
 
@@ -1796,6 +1796,7 @@ def get_produnct_set_detail(data):
1796
1796
 
1797
1797
  def add_product_set_to_live(data):
1798
1798
  "添加组合商品到直播间"
1799
+ global title
1799
1800
  env = data["env"]
1800
1801
  headers = data["headers"]
1801
1802
  sales_id = data["sales_id"]
@@ -1816,7 +1817,6 @@ def add_product_set_to_live(data):
1816
1817
  spu_ids = list(childrenInfo.keys())
1817
1818
  # necessaryQuantitys = jsonpath(data_list, "$..necessaryQuantity")
1818
1819
  data["product_id"] = product_id
1819
-
1820
1820
  # 查询组合商品详情信息
1821
1821
  response = get_produnct_set_detail(data)
1822
1822
  # print(response)
@@ -1883,7 +1883,7 @@ def add_product_set_to_live(data):
1883
1883
  time.sleep(2)
1884
1884
  data_res = requests.post(url, headers=headers, json=add_body).json()
1885
1885
  # print(data_res)
1886
- return product_id,products,keyword,data_res
1886
+ return product_id,products,keyword,title,data_res
1887
1887
  except Exception:
1888
1888
  print("出现异常")
1889
1889
 
@@ -2455,11 +2455,8 @@ def get_merchant_currency(data):
2455
2455
 
2456
2456
 
2457
2457
  if __name__=="__main__":
2458
- stamp1 = get_stamp_time({"num":5040})
2459
- print(stamp1)
2460
- stamp2 = get_stamp_time({"num": 6000})
2461
- print(stamp2)
2462
-
2458
+ data = {'env': 'https://front-service.shoplinestg.com', 'headers': {'Content-Type': 'application/json', 'authorization': 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIwMzkzZTdlODQ2MDMzZmUyOTViMjllY2I1OWVjOTgwOSIsImRhdGEiOnsibWVyY2hhbnRfaWQiOiI2MjI5YTdiYWVhNzA2NDJhOGI2NWViZGEiLCJhcHBsaWNhdGlvbl9pZCI6IjYwZWVjNWViZjhkYzkyMDAwNjUyZTAwNiJ9LCJpc3MiOiJodHRwczovL2RldmVsb3BlcnMteXkuc2hvcGxpbmVzdGcuY29tIiwiYXVkIjpbXSwic3ViIjoiNjIyOWE3YmFlYTcwNjQyYThiNjVlYmRhIn0.pKkJD01uFDUfiVR2gBJQFd_EtIvQkHR2ScJzRTTOxxg', 'lang': 'en'}, 'sales_id': '90566', 'arr': 0}
2459
+ add_product_set_to_live(data)
2463
2460
 
2464
2461
 
2465
2462
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc-common-interface
3
- Version: 2.9.0
3
+ Version: 2.9.1
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.9.0',
5
+ version='2.9.1',
6
6
  description='SC贴文销售公用的接口',
7
7
  author='river',
8
8
  packages=find_packages(),