Browse Source

Remove entity in QueryWrapper constructor (#13396)

3.2.0-release
Wenjun Ruan 2 years ago committed by GitHub
parent
commit
483330273d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/AlertDao.java
  2. 4
      dolphinscheduler-tools/src/main/java/org/apache/dolphinscheduler/tools/datasource/upgrader/v320/V320DolphinSchedulerUpgrader.java

3
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<Alert> listAlerts(int processInstanceId) {
LambdaQueryWrapper<Alert> wrapper = new QueryWrapper<>(new Alert()).lambda()
LambdaQueryWrapper<Alert> wrapper = new LambdaQueryWrapper<Alert>()
.eq(Alert::getProcessInstanceId, processInstanceId);
return alertMapper.selectList(wrapper);
}

4
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<ProcessInstance> wrapper = new QueryWrapper<>(new ProcessInstance())
LambdaQueryWrapper<ProcessInstance> wrapper = new QueryWrapper<ProcessInstance>()
.lambda()
.eq(ProcessInstance::getProjectCode, null)
.last("limit 1000");
@ -109,7 +109,7 @@ public class V320DolphinSchedulerUpgrader implements DolphinSchedulerUpgrader {
private void upgradeTaskInstance() {
while (true) {
LambdaQueryWrapper<TaskInstance> wrapper = new QueryWrapper<>(new TaskInstance())
LambdaQueryWrapper<TaskInstance> wrapper = new QueryWrapper<TaskInstance>()
.lambda()
.eq(TaskInstance::getProjectCode, null)
.last("limit 1000");

Loading…
Cancel
Save