提交暂存
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1332,30 +1332,35 @@ class PriceTask:
|
||||
|
||||
url = f"{DELETE_BRAND_API_BASE}/api/price-track/tasks/{task_id}/result"
|
||||
|
||||
country_aliases = {name: code for code, name in self.country_info.items()}
|
||||
country_key = country_aliases.get(str(country_code).strip(), str(country_code).strip())
|
||||
|
||||
countries = {}
|
||||
if asin or status:
|
||||
countries[country_key] = [
|
||||
{
|
||||
"shopMallName": shopMallName,
|
||||
"asin": asin,
|
||||
"price": status.get("currentPrice") if status.get("currentPrice") else "",
|
||||
"recommendedPrice": status.get("recommendedPrice") if status.get("recommendedPrice") else "",
|
||||
"minimumPrice": status.get("minimumPrice") if status.get("minimumPrice") else "",
|
||||
"firstPlace": status.get("firstPlace") if status.get("firstPlace") else "",
|
||||
"secondPlace": status.get("secondPlace") if status.get("secondPlace") else "",
|
||||
"cartShopName": status.get("cartShopName") if status.get("cartShopName") else "",
|
||||
"priceChangeStatus": "UPDATED",
|
||||
"deleteSkipAsin": status.get("deleteSkipAsin", False),
|
||||
"removeAsin": status.get("removeAsin") if status.get("removeAsin") else "",
|
||||
# "modifyCount": "2",
|
||||
"shippingFee": status.get("shippingFee") if status.get("shippingFee") else "",
|
||||
"status": status.get("statu")
|
||||
}
|
||||
]
|
||||
|
||||
payload = {
|
||||
"shops": [
|
||||
{
|
||||
"shopName": shop_name,
|
||||
"countries": {
|
||||
"additionalProperties1": [
|
||||
{
|
||||
"shopMallName": shopMallName,
|
||||
"asin": asin,
|
||||
"price": status.get("currentPrice") if status.get("currentPrice") else "",
|
||||
"recommendedPrice": status.get("recommendedPrice") if status.get("recommendedPrice") else "",
|
||||
"minimumPrice": status.get("minimumPrice") if status.get("minimumPrice") else "",
|
||||
"firstPlace": status.get("firstPlace") if status.get("firstPlace") else "",
|
||||
"secondPlace": status.get("secondPlace") if status.get("secondPlace") else "",
|
||||
"cartShopName": status.get("cartShopName") if status.get("cartShopName") else "",
|
||||
"priceChangeStatus": "UPDATED",
|
||||
"deleteSkipAsin": status.get("deleteSkipAsin",False),
|
||||
"removeAsin": status.get("removeAsin") if status.get("removeAsin") else "",
|
||||
# "modifyCount": "2",
|
||||
"shippingFee" : status.get("shippingFee") if status.get("shippingFee") else "",
|
||||
"status": status.get("statu")
|
||||
}
|
||||
]
|
||||
},
|
||||
"countries": countries,
|
||||
"error": ""
|
||||
}
|
||||
]
|
||||
@@ -1442,4 +1447,4 @@ if __name__ == '__main__':
|
||||
front_end_data, current_Price, current_shop_name,
|
||||
recommended_price, recommended_shipping
|
||||
)
|
||||
print(res)
|
||||
print(res)
|
||||
|
||||
Reference in New Issue
Block a user