//在and中使用or select * from t where 1=1 and ( a or b )
queryWrapper.and(!ObjectUtils.isEmpty(zczjdwVO.getWtlxyj()) ,
wrapper -> wrapper.like(!ObjectUtils.isEmpty(zczjdwVO.getWtlxyj()), "wtlxyj", zczjdwVO.getWtlxyj())
.or()
.like(!ObjectUtils.isEmpty(zczjdwVO.getWtlxej()), "wtlxej", zczjdwVO.getWtlxej())
);
mybatis-plus简单使用技巧
最新推荐文章于 2024-06-12 23:40:32 发布