Remove entity in QueryWrapper constructor (#13396)

This commit is contained in:
Wenjun Ruan 2023-01-14 20:57:03 +08:00 committed by GitHub
parent e39bf59b4b
commit 483330273d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -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);
}

View File

@ -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");