From 8b350b9fe050209152132e1a97d0ce0a0fde5d58 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Tue, 4 Apr 2023 12:13:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95=E9=A6=96=E9=A1=B5=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1=E8=A1=A8=E6=A0=BC=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8C=89=E7=85=A7=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1025104 --user=宋天阳 【接口测试】接口测试首页-运行中的定时任务列表排序没有规则 https://www.tapd.cn/55049933/s/1359129 --- .../base/mapper/ext/BaseScheduleMapper.xml | 64 ++++++++++--------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseScheduleMapper.xml b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseScheduleMapper.xml index 8329338cd6..f2d0187088 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseScheduleMapper.xml +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/base/mapper/ext/BaseScheduleMapper.xml @@ -55,10 +55,10 @@ SELECT COUNT(id) AS countNumber FROM `schedule` WHERE resource_id IN ( - SELECT scene.id - FROM api_scenario scene - WHERE scene.project_id = #{projectId,jdbcType=VARCHAR} - AND scene.status != 'Trash' + SELECT scene.id + FROM api_scenario scene + WHERE scene.project_id = #{projectId,jdbcType=VARCHAR} + AND scene.status != 'Trash' AND version_id = #{versionId} @@ -66,29 +66,29 @@ AND latest = 1 ) - AND create_time BETWEEN #{startTime} AND #{endTime} + AND create_time BETWEEN #{startTime} AND #{endTime} SELECT sch.id AS taskID, sch.`name` AS `name`, - sch.`value` AS rule, - sch.`enable` AS `taskStatus`, + sch.`value` AS rule, + sch.`enable` AS `taskStatus`, sch.update_time AS updateTime, - sch.id AS taskID, - sch.`value` AS rule, - sch.`enable` AS `taskStatus`, - u.`name` AS creator, + sch.id AS taskID, + sch.`value` AS rule, + sch.`enable` AS `taskStatus`, + u.`name` AS creator, sch.update_time AS updateTime, - sch.type AS taskType, - sch.`group` AS taskGroup, - sch.resource_id AS scenarioId + sch.type AS taskType, + sch.`group` AS taskGroup, + sch.resource_id AS scenarioId FROM ( schedule sch left join user u ON sch.user_id = u.id ) WHERE sch.`enable` = true AND sch.project_id = #{projectId,jdbcType=VARCHAR} - AND ( sch.group IN ('SWAGGER_IMPORT') @@ -137,8 +136,11 @@ AND sch.group IN ('API_SCENARIO_TEST','SWAGGER_IMPORT') + ORDER BY sch.update_time DESC - update schedule set name = #{name} where resource_id = #{resourceId} + update schedule + set name = #{name} + where resource_id = #{resourceId}