请问老师我的拼接的sql中有许多多于的括号,该如何去掉呢
SELECT id,name,age,email,create_by,create_time,update_by,update_time,deleted FROM t_test_user WHERE deleted=0 AND (name LIKE ? AND ( (age < ? OR email IS NOT NULL) ))
这个语句中加粗的应该都是多于的
下面是代码
QueryWrapper<UserModel> queryWrapper = Wrappers.query(); queryWrapper.likeRight("name", "王") .and(wq -> wq.lt("age", 40).or().isNotNull("email"));