feat: 新增触发计算任务接口
This commit is contained in:
@@ -16,7 +16,7 @@ class ModifierCalculator(Calculator):
|
||||
query = AsphaltModifier.get_query(self.year, self.month)
|
||||
query = query.with_entities(func.avg(AsphaltModifier.price))
|
||||
data = query.first()
|
||||
price = round(data[0]) if data else 0
|
||||
price = round(data[0]) if data and data[0] else 0
|
||||
fluctuating = self._get_fluctuating('price_recommend', price)
|
||||
return price, fluctuating
|
||||
|
||||
|
Reference in New Issue
Block a user