Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加condition方法,简化手动指定condition的重复工作 #6480

Closed

Conversation

ooooym
Copy link

@ooooym ooooym commented Sep 10, 2024

在构建动态条件时经常会遇到以下场景
QueryWrapper<Entity> queryWrapper = new QueryWrapper<Entity>() .eq(Objects.nonNull(entity.getId()), "id", entity.getId()) .eq(StringUtils.isBlank(entity.getName()), "name", entity.getName());
手动指定condition会有点繁琐,提供默认的方法,简化此步骤

@qmdx
Copy link
Member

qmdx commented Sep 18, 2024

这种要加的话那判断的方法可就多了,这个可以自己扩展封装下

@qmdx qmdx closed this Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants