@@ -14,9 +14,11 @@ public interface TestJobMapper extends BaseMapper<TestJob> {
/**
* 分页查询TestJob
* @param page 分页信息
* @param name 测试任务名(查询条件)
* @return 带有分页的测试任务列表
*/
@Select("SELECT\n"+
@Select("<script>"+
"SELECT\n"+
"\tktj.id,\n"+
"\tktj.`name`,\n"+
"\tktj.sql_statement,\n"+
...
...
@@ -25,6 +27,12 @@ public interface TestJobMapper extends BaseMapper<TestJob> {
"FROM\n"+
"\t`kt_test_job` ktj\n"+
"\tLEFT JOIN ( SELECT job_id, union_key FROM kt_execution_history WHERE id IN ( SELECT max( id ) FROM kt_execution_history WHERE job_id != - 1 GROUP BY job_id ) ) keh ON ktj.id = keh.job_id\n"+
"\tLEFT JOIN ( SELECT union_key, IF ( MIN( `status` )= 0, 0, MAX( `status` )) `status` FROM kt_execution_history GROUP BY union_key ) us ON us.union_key = keh.union_key")
IPage<TestJobVo>pageTestJob(IPage<TestJob>page);
"\tLEFT JOIN ( SELECT union_key, IF ( MIN( `status` )= 0, 0, MAX( `status` )) `status` FROM kt_execution_history GROUP BY union_key ) us ON us.union_key = keh.union_key"+