From 0a4f5b97fdc10c22845124d37758bad4eb94708e Mon Sep 17 00:00:00 2001 From: aaron <> Date: Fri, 14 Mar 2025 00:11:27 +0800 Subject: [PATCH] update --- app/api/endpoints/order.py | 4 +++- jobs.sqlite | Bin 24576 -> 24576 bytes 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/api/endpoints/order.py b/app/api/endpoints/order.py index a26bd50..a50beec 100644 --- a/app/api/endpoints/order.py +++ b/app/api/endpoints/order.py @@ -96,6 +96,7 @@ def calculate_price(price_request: OrderPriceCalculateRequest,user: UserDB,db: S base_price = settings.ORDER_BASE_PRICE extra_package_price = settings.ORDER_EXTRA_PACKAGE_PRICE extra_package_threshold = settings.ORDER_EXTRA_PACKAGE_THRESHOLD + base_more_station_price = 0 # 获取小区定价 if price_request.community_id > 0: @@ -106,6 +107,7 @@ def calculate_price(price_request: OrderPriceCalculateRequest,user: UserDB,db: S base_price = float(community.base_price) extra_package_price = float(community.extra_package_price) extra_package_threshold = int(community.extra_package_threshold) + base_more_station_price = float(community.more_station_price) # 是否有多驿站 more_station_price = float(community.more_station_price) * (len(price_request.packages) - 1) if len(price_request.packages) > 1 else 0 @@ -152,7 +154,7 @@ def calculate_price(price_request: OrderPriceCalculateRequest,user: UserDB,db: S result.price_info.final_amount = round(remaining_amount, 2) # 计算价格详情 - result.price_detail_text = f"基础配送费 {round(base_price, 1)} 元(限 {extra_package_threshold} 件),超件 {round(extra_package_price, 1)} 元 / 件,多驿站每件加收 {round(more_station_price, 1)} 元 。" + result.price_detail_text = f"基础配送费{round(base_price, 1)}元(限{extra_package_threshold}件), 超件{round(extra_package_price, 1)}元/件, 超过1个驿站加收{round(base_more_station_price, 1)}元/站。" return result diff --git a/jobs.sqlite b/jobs.sqlite index cdd5a258b96aec8ff6acbdb672c8d4b7ad3da65d..41011d691cb9800b99e01160026efdc51dd31a28 100644 GIT binary patch delta 61 zcmZoTz}Rqrae_3Xz(g5mMuCk9w$jX3LT+qcARWNM$iMlcyo3PzJO1zdKlp!a7Bsla PKl!aaKUl$kdqxESp5qra delta 61 zcmZoTz}Rqrae_1>`$QRMM)r*fw$jX(nIkqYkPcvB