tech.jhipster.service.mybatis.CriteriaUtil Maven / Gradle / Ivy
package tech.jhipster.service.mybatis;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.util.function.Consumer;
public class CriteriaUtil {
public static QueryWrapper build(boolean useOr, QueryWrapper queryWrapper, Consumer> consumer) {
if (useOr) {
return queryWrapper.or(true,consumer);
} else {
return queryWrapper.and(true,consumer);
}
}
}