Merge pull request #5379 from dataease/pr@dev@fix_dataset-page-select

fix(数据集): 优化数据集同步界面分页查询逻辑,解决分页查询慢的问题
This commit is contained in:
王嘉豪 2023-05-31 19:58:52 +08:00 committed by GitHub
commit ad9280aed5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,6 +83,22 @@
</if>
</select>
<select id="userTaskList_COUNT" resultType="LONG">
SELECT count(0)
FROM dataset_table_task
left join dataset_table on dataset_table.id=dataset_table_task.table_id
left join qrtz_triggers on dataset_table_task.id=qrtz_triggers.TRIGGER_NAME
<if test="_parameter != null">
<include refid="io.dataease.ext.query.GridSql.taskListGridCondition"/>
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="orderByClause == null">
order by dataset_table_task.create_time desc
</if>
</select>
<select id="taskWithTriggers" resultMap="TaskResult" parameterType="io.dataease.ext.query.GridExample">
SELECT dataset_table.name as table_name, get_auths(dataset_table_task.table_id,'dataset', #{extendCondition}) as
`privileges`,dataset_table_task.* , qrtz_triggers.NEXT_FIRE_TIME