private static final String FILTER_PREFIX = "f_";
@SuppressWarnings("rawtypes")
public static Page populate(PageInfo pageInfo, PageInfoInterceptor pageInfoInterceptor) {
Class<? extends Model<?>> model = pageInfoInterceptor.model();
Table tableinfo = TableMapping.me().getTable(model);
Map<String, Class<?>> columnTypeMap = Reflect.on(tableinfo).get("columnTypeMap");
String select = "select ";
if (StrKit.isBlank(pageInfoInterceptor.columns())) {
Set<String> set = columnTypeMap.keySet();
for (String item : set) {
select += item + ",";
}
if (!pageInfoInterceptor.relations().isEmpty()) {
for (RelationInfo relation : pageInfoInterceptor.relations()) {
Class<? extends Model<?>> modelClass = relation.getModel();
Table relationTableinfo = TableMapping.me().getTable(modelClass);
Map<String, Class<?>> relationColumnTypeMap = Reflect.on(relationTableinfo).get("columnTypeMap");
set = relationColumnTypeMap.keySet();
// 如果设置了前缀表明或者字段冲突的时候
for (String item : set) {
if (pageInfoInterceptor.useColumnLabel()