From 17d97d2c9399d084ade8b8b2ea322cfb6758e09c Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 29 Jun 2021 11:07:01 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=83=A8=E5=88=86=E8=A1=A8?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml | 6 +++--- .../metersphere/base/mapper/ext/ExtOperatingLogMapper.xml | 4 ++-- .../resources/db/migration/V68__modify_api_test_case.sql | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml index 7b151e0138..0d467c06d2 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml @@ -219,9 +219,9 @@ api_test_case t1 LEFT JOIN api_definition_exec_result t2 ON t1.last_result_id = t2.id inner join api_definition a on t1.api_definition_id = a.id - LEFT JOIN USER u1 ON t1.update_user_id = u1.id - LEFT JOIN USER u2 ON t1.create_user_id = u2.id - LEFT JOIN USER u3 ON t2.user_id = u3.id + LEFT JOIN `user` u1 ON t1.update_user_id = u1.id + LEFT JOIN `user` u2 ON t1.create_user_id = u2.id + LEFT JOIN `user` u3 ON t2.user_id = u3.id and t1.name like CONCAT('%', #{request.name},'%') diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml index 450410f4f6..504bd40832 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml @@ -16,7 +16,7 @@ t2.`name` projectName FROM operating_log t - LEFT JOIN USER t1 ON t.oper_user = t1.id + LEFT JOIN `user` t1 ON t.oper_user = t1.id LEFT JOIN project t2 ON t.project_id = t2.id LEFT JOIN workspace w on t2.workspace_id = w.id @@ -67,7 +67,7 @@ t2.`name` projectName FROM operating_log t - LEFT JOIN USER t1 ON t.oper_user = t1.id + LEFT JOIN `user` t1 ON t.oper_user = t1.id LEFT JOIN project t2 ON t.project_id = t2.id LEFT JOIN workspace w on t2.workspace_id = w.id diff --git a/backend/src/main/resources/db/migration/V68__modify_api_test_case.sql b/backend/src/main/resources/db/migration/V68__modify_api_test_case.sql index e1cd16169e..0b7672a7b6 100644 --- a/backend/src/main/resources/db/migration/V68__modify_api_test_case.sql +++ b/backend/src/main/resources/db/migration/V68__modify_api_test_case.sql @@ -8,8 +8,8 @@ INNER JOIN ( ader.id AS result_id FROM api_test_case atc - LEFT JOIN USER u1 ON atc.create_user_id = u1.id - LEFT JOIN USER u2 ON atc.update_user_id = u2.id + LEFT JOIN `user` u1 ON atc.create_user_id = u1.id + LEFT JOIN `user` u2 ON atc.update_user_id = u2.id LEFT JOIN ( SELECT max( create_time ) create_time, @@ -24,4 +24,4 @@ INNER JOIN ( ) tc SET tt.last_result_id = tc.result_id WHERE - tt.id = tc.id; \ No newline at end of file + tt.id = tc.id;