QueryWrapper<UserEntity> userWrapper = new QueryWrapper<>();
userWrapper.and(wrapper->wrapper.eq("username", "test2").or().eq("username", "test2"))
.or(wrapper -> wrapper.like("username", "test2").or().like("username", "test2"));
# SELECT id,username,pwd,date_u,time_u,u_num,img FROM student WHERE ( username = ? OR username = ? ) OR ( username LIKE ? OR username LIKE ? )
QueryWrapper<UserEntity> userWrapper = new QueryWrapper<>();
userWrapper.and(wrapper->wrapper.eq("username", "test2").or().eq("username", "test2"))
.and(wrapper -> wrapper.like("username", "test2").or().like("username", "test2"));
#SELECT id,username,pwd,date_u,time_u,u_num,img FROM student WHERE ( username = ? OR username = ? ) AND ( username LIKE ? OR username LIKE ? )
QueryWrapper userWrapper = new QueryWrapper<>();
userWrapper.apply("select stamp_u,username,name,age from student,rel_student where student.id=rel_student.id");
#select stamp_u,username,name,age from student,rel_student where student.id=rel_student.id
QueryWrapper<UserEntity> userWrapper = new QueryWrapper<>();
userWrapper.eq("username", "test").eq("username", "test");
#select * from student WHERE username = ? and username = ?
网友评论