peng 1 жил өмнө
parent
commit
a20b54cc72

+ 3 - 3
Controller/Cron/CronTaskController.py

@@ -1174,7 +1174,7 @@ class CronCollectDataView(View):
                     expire = str(order_qs[0]['rank__expire']) + '个月'
                     price = float(order['price'])
                     if order['payType'] in [2, 3]:
-                        fee = 0.0054 * price
+                        fee = round(0.0054 * price, 2)
                     else:
                         fee = float(order['fee']) if order['fee'] else 0
                     order_start_time = int((datetime.datetime.fromtimestamp(item['end_time']) - relativedelta(
@@ -1210,8 +1210,8 @@ class CronCollectDataView(View):
                     storage_cost = round(actual_storage / 1024 * storage_univalence * settlement_days, 2)
                     api_cost = round(actual_api * api_univalence, 2)
                     if CONFIG_INFO == CONFIG_CN:  # 国内要换算汇率
-                        storage_cost = storage_cost * 7
-                        api_cost = api_cost * 7
+                        storage_cost = round(storage_cost * 7, 2)
+                        api_cost = round(api_cost * 7, 2)
                     if monthly_income == 0.0:
                         profit = 0
                         profit_margin = 0