From 483330273d112ae776f2fea2fa9437bc642ca3f3 Mon Sep 17 00:00:00 2001 From: Wenjun Ruan Date: Sat, 14 Jan 2023 20:57:03 +0800 Subject: [PATCH] Remove entity in QueryWrapper constructor (#13396) --- .../main/java/org/apache/dolphinscheduler/dao/AlertDao.java | 3 +-- .../upgrader/v320/V320DolphinSchedulerUpgrader.java | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/AlertDao.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/AlertDao.java index a094647861..6d7a26ee1c 100644 --- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/AlertDao.java +++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/AlertDao.java @@ -56,7 +56,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.google.common.base.Strings; import com.google.common.collect.Lists; @@ -282,7 +281,7 @@ public class AlertDao { } public List listAlerts(int processInstanceId) { - LambdaQueryWrapper wrapper = new QueryWrapper<>(new Alert()).lambda() + LambdaQueryWrapper wrapper = new LambdaQueryWrapper() .eq(Alert::getProcessInstanceId, processInstanceId); return alertMapper.selectList(wrapper); } diff --git a/dolphinscheduler-tools/src/main/java/org/apache/dolphinscheduler/tools/datasource/upgrader/v320/V320DolphinSchedulerUpgrader.java b/dolphinscheduler-tools/src/main/java/org/apache/dolphinscheduler/tools/datasource/upgrader/v320/V320DolphinSchedulerUpgrader.java index aceff6f758..293ec2a61a 100644 --- a/dolphinscheduler-tools/src/main/java/org/apache/dolphinscheduler/tools/datasource/upgrader/v320/V320DolphinSchedulerUpgrader.java +++ b/dolphinscheduler-tools/src/main/java/org/apache/dolphinscheduler/tools/datasource/upgrader/v320/V320DolphinSchedulerUpgrader.java @@ -77,7 +77,7 @@ public class V320DolphinSchedulerUpgrader implements DolphinSchedulerUpgrader { .collect(Collectors.toMap(User::getId, User::getUserName)); while (true) { - LambdaQueryWrapper wrapper = new QueryWrapper<>(new ProcessInstance()) + LambdaQueryWrapper wrapper = new QueryWrapper() .lambda() .eq(ProcessInstance::getProjectCode, null) .last("limit 1000"); @@ -109,7 +109,7 @@ public class V320DolphinSchedulerUpgrader implements DolphinSchedulerUpgrader { private void upgradeTaskInstance() { while (true) { - LambdaQueryWrapper wrapper = new QueryWrapper<>(new TaskInstance()) + LambdaQueryWrapper wrapper = new QueryWrapper() .lambda() .eq(TaskInstance::getProjectCode, null) .last("limit 1000");