sc-common-interface 2.7.9__tar.gz → 2.8.0__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.7.9
3
+ Version: 2.8.0
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -2113,15 +2113,31 @@ def handler_auto_reply(data):
2113
2113
  delete_auto_reply(data)
2114
2114
 
2115
2115
 
2116
+ def handler_bidding(data):
2117
+ "删除在开启中的竞标活动"
2118
+ env = data["env"]
2119
+ headers = data["headers"]
2120
+ sales_id = data["sales_id"]
2121
+ url = "%s/admin/api/bff-web/live/activity/list/POST/%s"%(env,sales_id)
2122
+ response = requests.get(url,headers=headers)
2123
+ if response.status_code==200:
2124
+ for i in response.json()["data"]:
2125
+ status = i["status"]
2126
+ activity_type = i["type"]
2127
+ if status=="PROGRESS" and activity_type=="BIDDING":
2128
+ activity_id = i["id"]
2129
+ data["activity_id"] = activity_id
2130
+ end_activity(data)
2131
+ time.sleep(1)
2132
+ delate_activity(data)
2133
+
2116
2134
 
2117
2135
 
2118
2136
 
2119
2137
 
2120
2138
 
2121
2139
  if __name__=="__main__":
2122
- data = {'env': 'https://front-admin-preview.shoplineapp.com', 'headers': {'Content-Type': 'application/json', 'authorization': 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJkZmQxYjNiMDc0M2JmYWU4YTFkODk4NzczNjgyZWVkZCIsImRhdGEiOnsibWVyY2hhbnRfaWQiOiI2MWE4N2M5NzYzYjcwYzAwNTEwNmZiZDAiLCJhcHBsaWNhdGlvbl9pZCI6IjVlYjkwMzVhYjA5ZDEyNjU4NTFmOTU2ZiJ9LCJpc3MiOiJodHRwczovL2RldmVsb3BlcnMtcHJldmlldy5zaG9wbGluZWFwcC5jb20iLCJhdWQiOltdLCJzdWIiOiI2MWE4N2M5NzYzYjcwYzAwNTEwNmZiZDAifQ.Y90xLfYVAp9yByHo7Vc7A3hHrp6hX9X9Lg4mg_WiE_I', 'lang': 'en'}, 'platform': 'FB_GROUP', 'sales_id': '514694', 'activity_id': '10296402', 'keyword': 'lyqyh1738918140786', 'post_id': '3592205981019493_3943831999190221', 'page_id': '106411048594439', 'group_id': '3592205981019493', 'key': '5e3bba98882fc0fb22a0607238bc5b8f'}
2123
- data["keyword"] = "lyqyh1738918047653"
2124
- send__live_comment(data)
2140
+ pass
2125
2141
 
2126
2142
 
2127
2143
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc-common-interface
3
- Version: 2.7.9
3
+ Version: 2.8.0
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.7.9',
5
+ version='2.8.0',
6
6
  description='SC贴文销售公用的接口',
7
7
  author='river',
8
8
  packages=find_packages(),