Commit a33dd578 authored by liguangyu06's avatar liguangyu06
Browse files

优化代码

parent 4be3303c
......@@ -48,8 +48,9 @@ product_price = result["data"][0]["referencePrice"]
purchase_quantity = random.randint(6, 10)
# 计算减免金额
amount = result["data"][0]["directUnitPrice"]*purchase_quantity
# 保留两位小数(四舍五入)
amount = round(amount, 2)
print(amount)
# 第四步验证减免金额正确性
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url10")
request_body = commonFuc().get_business_data(module, "payload10", company_code, product_id, product_code, product_price,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment