public R<IPage<NoticeVO>> list(@ApiIgnore @RequestParam Map<String, Object> notice, Query query) {
IPage<Notice> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class));
return R.data(NoticeWrapper.build().pageVO(pages));
}
这个可以默认支持模糊查询,查看类SqlKeyword 可以有不同条件,如果要实现多字段查询,有模糊 有等号等匹配是哪里设置的,目前调试代码都是执行qw.like(getColumn(k, "_like"), v) 这段代码,前端是都有配置的地方
(!hasEmpty(k, v) && !k.endsWith()) {
(k.endsWith()) {
qw.eq(getColumn(k, ), v);
} (k.endsWith()) {
qw.ne(getColumn(k, ), v);
} (k.endsWith()) {
qw.likeLeft(getColumn(k, ), v);
} (k.endsWith()) {
qw.likeRight(getColumn(k, ), v);
} (k.endsWith()) {
qw.notLike(getColumn(k, ), v);
} (k.endsWith()) {
qw.ge(getColumn(k, ), v);
} (k.endsWith()) {
qw.le(getColumn(k, ), v);
} (k.endsWith()) {
qw.gt(getColumn(k, ), v);
} (k.endsWith()) {
qw.lt(getColumn(k, ), v);
} (k.endsWith()) {
qw.ge(getColumn(k, ), DateUtil.parse(String.valueOf(v), ));
} (k.endsWith()) {
qw.gt(getColumn(k, ), DateUtil.parse(String.valueOf(v), ));
} (k.endsWith()) {
qw.eq(getColumn(k, ), DateUtil.parse(String.valueOf(v), ));
} (k.endsWith()) {
qw.le(getColumn(k, ), DateUtil.parse(String.valueOf(v), ));
} (k.endsWith()) {
qw.lt(getColumn(k, ), DateUtil.parse(String.valueOf(v), ));
} (k.endsWith()) {
qw.isNull(getColumn(k, ));
} (k.endsWith()) {
qw.isNotNull(getColumn(k, ));
} {
qw.like(getColumn(k, ), v);
}