From d9c7da8ef9e31d29c9fee97c015350f508ec0d8f Mon Sep 17 00:00:00 2001 From: wangqifan Date: Mon, 1 Sep 2025 16:47:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AE=9E=E4=BE=8B=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=B7=BB=E5=8A=A0gp2?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E4=BB=B7=E6=A0=BC=E7=9A=84=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BB=A5=E7=A1=AE=E4=BF=9D=E5=9C=A8?= =?UTF-8?q?gp3=E4=BB=B7=E6=A0=BC=E4=B8=BA0=E6=97=B6=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E7=A3=81=E7=9B=98=E6=9C=88=E5=BA=A6=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/services/aws/pricing_v2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/app/services/aws/pricing_v2.py b/backend/app/services/aws/pricing_v2.py index 2038d6e..de5a6f8 100644 --- a/backend/app/services/aws/pricing_v2.py +++ b/backend/app/services/aws/pricing_v2.py @@ -96,6 +96,7 @@ async def search_instances_v2( for row in results: hourly_price = float(row['price']) gp3_price = float(row['gp3']) + gp2_price = float(row['gp2']) monthly_price = hourly_price * 730 # 730小时/月 # 计算存储价格 @@ -109,7 +110,7 @@ async def search_instances_v2( break # disk_monthly_price = await calculate_ebs_price(region_code, disk_gb) if region_code else 0 - disk_monthly_price = gp3_price * disk_gb + disk_monthly_price = gp3_price * disk_gb if gp3_price > 0 else gp2_price * disk_gb # 计算总价格 total_monthly_price = monthly_price + disk_monthly_price