sc-common-interface 3.0.4__tar.gz → 3.0.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.
Files changed (17) hide show
  1. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/PKG-INFO +1 -1
  2. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface/CommonOa.py +5 -2
  3. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface/LiveCommonInterface.py +18 -4
  4. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface/PostCommonInterface.py +3 -3
  5. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface.egg-info/PKG-INFO +1 -1
  6. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/setup.py +1 -1
  7. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface/McCommonInterface.py +0 -0
  8. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface/OperaMysql.py +0 -0
  9. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface/OperaRedis.py +0 -0
  10. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface/ScPulsar.py +0 -0
  11. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface/ScWebsocket.py +0 -0
  12. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface/__init__.py +0 -0
  13. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface.egg-info/SOURCES.txt +0 -0
  14. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface.egg-info/dependency_links.txt +0 -0
  15. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface.egg-info/requires.txt +0 -0
  16. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/sc_common_interface.egg-info/top_level.txt +0 -0
  17. {sc_common_interface-3.0.4 → sc_common_interface-3.0.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc_common_interface
3
- Version: 3.0.4
3
+ Version: 3.0.6
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -239,9 +239,12 @@ 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
 
242
+
243
+
244
+
242
245
  if __name__=="__main__":
243
- format_time = get_str_time(num=179,time_type="add")
244
- print(format_time)
246
+ pass
247
+
245
248
 
246
249
 
247
250
 
@@ -2645,16 +2645,30 @@ def get_bulk_edit_keyword(data):
2645
2645
  spuList.append(spu)
2646
2646
  return bulk_edit_body
2647
2647
 
2648
+ def syn_line_product(data):
2649
+ env = data["env"]
2650
+ headers = data["headers"]
2651
+ sales_id = data["sales_id"]
2652
+ product_id = data["product_id"]
2653
+ line_status = data.get("line_status","HIDDEN")
2654
+ url = "%s/api/posts/post/sales/%s/spu/%s/status?status=%s"%(env,sales_id,product_id,line_status)
2655
+ response = requests.post(url,headers=headers).json()
2656
+ return response
2648
2657
 
2649
2658
 
2650
-
2651
-
2659
+ def get_product_detail(data):
2660
+ #headers为sc使用的token
2661
+ oa_env = data["oa_env"]
2662
+ headers = data["headers"]
2663
+ product_id = data["product_id"]
2664
+ url = "%s/v1/products/%s?strategy=app_token&includes[]=locked_inventory_count"%(oa_env,product_id)
2665
+ res = requests.get(url, headers=headers).json()
2666
+ return res
2652
2667
 
2653
2668
 
2654
2669
 
2655
2670
  if __name__ == "__main__":
2656
- for i in range(60):
2657
- send_comment()
2671
+ pass
2658
2672
 
2659
2673
 
2660
2674
 
@@ -496,7 +496,7 @@ def create_fb_text_post(data):
496
496
  body = {"postDescription":postDescription,"platform":platform,
497
497
  "url":[],"mediaFbid":[],"pageId":page_id}
498
498
  response = requests.post(url,headers=headers,json=body).json()
499
- print("创建贴文返回",response)
499
+ # print("创建贴文返回",response)
500
500
  post_id = response["data"]["post_id"]
501
501
  post_pid = response["data"]["id"]
502
502
  return post_id,post_pid,response
@@ -1714,6 +1714,6 @@ def edit_message(data):
1714
1714
 
1715
1715
 
1716
1716
 
1717
-
1718
1717
  if __name__=="__main__":
1719
- pass
1718
+ pass
1719
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc-common-interface
3
- Version: 3.0.4
3
+ Version: 3.0.6
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='3.0.4',
5
+ version='3.0.6',
6
6
  description='SC贴文销售公用的接口',
7
7
  author='river',
8
8
  packages=find_packages(),