mybatis-plus的LambdaQueryWrapper中and、or的用法
//WHERE (phone = ? AND (syr_id = ? OR sale_id = ?))
receptionQuery.eq(ScrmReceptionInfo::getPhone, queryDTO.getPhone());
receptionQuery.and(wrapper->{
wrapper.eq(ScrmReceptionInfo::getSyrId, queryDTO.getSyrId());
wrapper.or().eq(ScrmReceptionInfo::getSaleId,queryDTO.getCreateId());
});
参考文档地址: https://blog.csdn.net/monody666/article/details/121955426