All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy