使用mybatisplus生成or连接的两个and语句
new LambdaQueryWrapper<SysUserDetailAudit>()
.and(wrapper -> wrapper.ge(SysUserDetailAudit::getCreatedTime,todayStartTime).eq(SysUserDetailAudit::getInfoStatus,Constants.STRING_TWO))
.or(wrapper -> wrapper.ge(SysUserDetailAudit::getUpdatedTime,todayStartTime).eq(SysUserDetailAudit::getInfoStatus,"6"))
生成的sql语句如下:
SELECT * from sys_org_user_detail_audit WHERE ( created_time >= ? AND info_status = ? ) OR ( updated_time >= ? AND info_status = ? )