java使用orm方式添加or语句

     String sqlbandid = "select id from xb_bandwidth where namecn='多速率自适应' or valuekbs>=158720.000";
        Criterion exp1 = QueryExpressionUtil.in("SABANDWIDTHID", sqlbandid);
        Criterion exp2 = QueryExpressionUtil.equals("SERVICESTATUS", 1);
        criterial.addExpression(QueryExpressionUtil.orExpression(exp1, exp2));

你可能感兴趣的:(java)