public List<Entity> findList(RequestModel model) {
return this.findList(() -> dsl()
.select()
.from(meetingInformation)
.where(initConditionUsingEntity(model, (c, r, e) -> {
Condition condition = c;
if (Objects.nonNull(model.getDName())) {
condition = condition.and(meetingInformation.D_NAME.like(concat("%", e.getDName(), "%")));
}
if (Objects.nonNull(model.getTopic())) {
condition = condition.and(meetingInformation.TOPIC.like(concat("%", e.getTopic(), "%")));
}
if (Objects.nonNull(model.getStartTime())) {
condition = condition.and(meetingInformation.D_TIME.ge(model.getStartTime()));
}
if (Objects.nonNull(model.getCompletedTime())) {
condition = condition.and(meetingInformation.D_TIME.le(model.getCompletedTime()));
}
return condition;
}, EJLambda.predicateTrue(), field -> field.getName().matches("(d_name|topic)")))
.orderBy(meetingInformation.D_TIME.desc().nullsLast())
.fetch().into(entityClass()), depthTree());
}
JOOQ的模糊查询
免责声明:文章转载自《JOOQ的模糊查询》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=