feat: 新增单独计算近半年均价的接口
This commit is contained in:
@@ -38,6 +38,7 @@ def refresh_task(task_id):
|
||||
class CalculateQuery(BaseModel):
|
||||
year: int = Field(title='年份')
|
||||
month: int = Field(title='月份')
|
||||
only_avg: int = Field(title='是否只计算均值')
|
||||
|
||||
|
||||
@data.route('/calculate', methods=['GET'])
|
||||
@@ -51,6 +52,6 @@ def start_calculate(query: CalculateQuery):
|
||||
@data.route('/collect', methods=['GET'])
|
||||
@siwa.doc(tags=[""], summary='触发计算任务', query=CalculateQuery)
|
||||
def start_collect(query: CalculateQuery):
|
||||
collect(year=query.year, month=query.month)
|
||||
collect(year=query.year, month=query.month, only_avg=query.only_avg)
|
||||
|
||||
return Response()
|
||||
|
Reference in New Issue
Block a user