|
@@ -81,14 +81,15 @@ async def select_tasks(
|
|
|
data_query = data_query.filter(TaskRegistration.creation_time == query.creation_time)
|
|
|
if query.processing_status:
|
|
|
data_query = data_query.filter(TaskRegistration.processing_status == query.processing_status)
|
|
|
-
|
|
|
+
|
|
|
+ total_count = data_query.count()
|
|
|
# 计算分页的偏移量
|
|
|
offset = (pageNum - 1) * pageSize
|
|
|
# 应用分页
|
|
|
data_query = data_query.offset(offset).limit(pageSize)
|
|
|
|
|
|
tasks = data_query.all()
|
|
|
- total_count = data_query.count()
|
|
|
+
|
|
|
|
|
|
return {
|
|
|
"code": 200,
|