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 cdd5a25..41011d6 100644 Binary files a/jobs.sqlite and b/jobs.sqlite differ