Skip to content

Yiyangi/yangsQueryUtil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

mybatis-puls 的querywrapper优化

User user = new User();

user.setId(1);

user.setUserName("小");

优化前

QueryWrapper queryWrapper1 = new QueryWrapper();

queryWrapper1.eq("user_name",user.getUserName());

queryWrapper1.eq("id",user.getId());

List list1 = userService.list(queryWrapper1);

优化后

QueryWrapper queryWrapper = Repository.fielList(user);

List list = userService.list(queryWrapper);

list.forEach(user1 -> { System.out.println(user1.toString());

});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages