// 动态传参 // 1. 声明 PathBuilder:MyTable 为类名称,"myTable" 为首字母小写后的类名 PathBuilder<MyTable> path = new PathBuilder<>(MyTable.class, "myTable"); // 2. 判断查询的列的名称是否 不为空 if (!ObjectUtils.isEmpty(xXXXCondition.getColumn1())) { String columnName1 = xXXXCondition.getColumn1(); String value1 = xXXXCondition.getValue1(); booleanBuilder.and(path.getString(columnName1).like('%' + value1 + '%')); }
标签:getColumn1,自定义,BooleanBuilder,columnName1,查询,PathBuilder,xXXXCondition From: https://www.cnblogs.com/uoky/p/17434802.html