sc-common-interface 3.2.1__tar.gz → 3.2.3__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-3.2.1 → sc_common_interface-3.2.3}/PKG-INFO +1 -1
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/LiveCommonInterface.py +11 -7
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/setup.py +1 -1
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/CommonOa.py +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/McCommonInterface.py +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/OperaMysql.py +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/OperaRedis.py +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/ScPulsar.py +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/ScWebsocket.py +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/__init__.py +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/pra.py +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/setup.cfg +0 -0
{sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -1875,6 +1875,8 @@ def get_produnct_set_detail(data):
|
|
|
1875
1875
|
headers = data["headers"]
|
|
1876
1876
|
product_id = data["product_id"]
|
|
1877
1877
|
sales_id = data["sales_id"]
|
|
1878
|
+
if isinstance(product_id, list):
|
|
1879
|
+
product_id = product_id[0]
|
|
1878
1880
|
url = "%s/admin/api/bff-web/live/sale/%s/product/product_set/%s" % (env, sales_id, product_id)
|
|
1879
1881
|
# print(url)
|
|
1880
1882
|
count = 0
|
|
@@ -1897,6 +1899,7 @@ def add_product_set_to_live(data):
|
|
|
1897
1899
|
sales_id = data["sales_id"]
|
|
1898
1900
|
keyword = data.get("keyword", "python添加商品关键子%d" % int(time.time()))
|
|
1899
1901
|
product_id = data.get("product_id", "")
|
|
1902
|
+
title = ""
|
|
1900
1903
|
if product_id == "":
|
|
1901
1904
|
set_list_res = get_product_set(data)
|
|
1902
1905
|
data_list = set_list_res["data"]["list"]
|
|
@@ -1936,11 +1939,14 @@ def add_product_set_to_live(data):
|
|
|
1936
1939
|
|
|
1937
1940
|
url = "%s/admin/api/bff-web/live/sale/%s/sale_list/product_set" % (env, sales_id)
|
|
1938
1941
|
# keyword = "python添加商品关键子%d" % int(time.time())
|
|
1942
|
+
# print(type(product_id))
|
|
1943
|
+
if isinstance(product_id,list):
|
|
1944
|
+
product_id = product_id[0]
|
|
1939
1945
|
if isinstance(keyword, str):
|
|
1940
1946
|
add_body = {
|
|
1941
1947
|
"spuList": [
|
|
1942
1948
|
{
|
|
1943
|
-
"id":
|
|
1949
|
+
"id": "%s" % product_id,
|
|
1944
1950
|
"defaultKey": "",
|
|
1945
1951
|
"combinationList": [
|
|
1946
1952
|
{
|
|
@@ -1977,10 +1983,10 @@ def add_product_set_to_live(data):
|
|
|
1977
1983
|
delete_product_set(data)
|
|
1978
1984
|
time.sleep(2)
|
|
1979
1985
|
data_res = requests.post(url, headers=headers, json=add_body).json()
|
|
1980
|
-
|
|
1986
|
+
print("data_res:",data_res)
|
|
1981
1987
|
return product_id, products, keyword, title, data_res
|
|
1982
|
-
except Exception:
|
|
1983
|
-
print("
|
|
1988
|
+
except Exception as e:
|
|
1989
|
+
print("出现异常:%s"%e)
|
|
1984
1990
|
|
|
1985
1991
|
|
|
1986
1992
|
def add_all_product_set_to_live(data):
|
|
@@ -2770,9 +2776,7 @@ def get_live_global(data):
|
|
|
2770
2776
|
|
|
2771
2777
|
|
|
2772
2778
|
if __name__ == "__main__":
|
|
2773
|
-
|
|
2774
|
-
res = live_search_oa_gift(data)
|
|
2775
|
-
print(res)
|
|
2779
|
+
pass
|
|
2776
2780
|
|
|
2777
2781
|
|
|
2778
2782
|
|
|
File without changes
|
{sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc_common_interface-3.2.1 → sc_common_interface-3.2.3}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|