sc-common-interface 2.3.5__tar.gz → 2.3.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.
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/PKG-INFO +1 -1
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface/PostCommonInterface.py +30 -1
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/setup.py +1 -1
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface/LiveCommonInterface.py +0 -0
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface/McCommonInterface.py +0 -0
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface/Platform.py +0 -0
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/setup.cfg +0 -0
{sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface/PostCommonInterface.py
RENAMED
|
@@ -1164,6 +1164,9 @@ def modelone_create_single_product(data):
|
|
|
1164
1164
|
env = data["env"]
|
|
1165
1165
|
headers = data["headers"]
|
|
1166
1166
|
sales_id = data["sales_id"]
|
|
1167
|
+
quantity = 1000
|
|
1168
|
+
if "quantity" in data:
|
|
1169
|
+
quantity = data["quantity"]
|
|
1167
1170
|
url = "%s/api/posts/post/sales/%s/product/create" % (env, sales_id)
|
|
1168
1171
|
product_name = "post接口新增商品多规格商品名称%d" % int(time.time())
|
|
1169
1172
|
if "product_name" in data:
|
|
@@ -1171,12 +1174,38 @@ def modelone_create_single_product(data):
|
|
|
1171
1174
|
keyword = "post接口新增商品多规格商品关键字%d" % int(time.time())
|
|
1172
1175
|
if "keyword" in data:
|
|
1173
1176
|
keyword = data["keyword"]
|
|
1174
|
-
body = {"customKey":keyword,"quantity":
|
|
1177
|
+
body = {"customKey":keyword,"quantity":quantity,"unlimitedQuantity":False,"productName":product_name,
|
|
1175
1178
|
"imageUrl":"https://s3-ap-southeast-1.amazonaws.com/static.shoplineapp.com/sc-admin/product-default.png","price":3}
|
|
1176
1179
|
response = requests.post(url,headers=headers,json=body).json()
|
|
1177
1180
|
spu_id = response["data"]
|
|
1178
1181
|
return spu_id
|
|
1179
1182
|
|
|
1183
|
+
def modelfour_create_single_product(data):
|
|
1184
|
+
"""
|
|
1185
|
+
贴文新增无规格商品
|
|
1186
|
+
:param data:
|
|
1187
|
+
:return: 返回新增的商品的spu_id
|
|
1188
|
+
"""
|
|
1189
|
+
env = data["env"]
|
|
1190
|
+
headers = data["headers"]
|
|
1191
|
+
sales_id = data["sales_id"]
|
|
1192
|
+
quantity = 1000
|
|
1193
|
+
if "quantity" in data:
|
|
1194
|
+
quantity = data["quantity"]
|
|
1195
|
+
url = "%s/api/posts/post/sales/%s/product/create" % (env, sales_id)
|
|
1196
|
+
product_name = "post接口新增商品多规格商品名称%d" % int(time.time())
|
|
1197
|
+
if "product_name" in data:
|
|
1198
|
+
product_name = data["product_name"]
|
|
1199
|
+
keyword = "post接口新增商品多规格商品关键字%d" % int(time.time())
|
|
1200
|
+
if "keyword" in data:
|
|
1201
|
+
keyword = data["keyword"]
|
|
1202
|
+
body = {"customNumber":keyword,"quantity":quantity,"unlimitedQuantity":False,"productName":product_name,
|
|
1203
|
+
"imageUrl":"https://s3-ap-southeast-1.amazonaws.com/static.shoplineapp.com/sc-admin/product-default.png","price":3}
|
|
1204
|
+
response = requests.post(url,headers=headers,json=body).json()
|
|
1205
|
+
spu_id = response["data"]
|
|
1206
|
+
return spu_id
|
|
1207
|
+
|
|
1208
|
+
|
|
1180
1209
|
def modelone_create_mutil_product(data):
|
|
1181
1210
|
"""
|
|
1182
1211
|
贴文新增多规格商品,
|
{sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
File without changes
|
{sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.3.5 → sc-common-interface-2.3.6}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|