nutz 本身有没有封装如下功能
QueryResult queryResult = tmUserDao.getPopularUser(request.getUserId(), BaseTagEnum.POPULAR.code, request.getPageNumber(), request.getPageSize());
if (BeanUtils.isNotEmpty(queryResult.getList())) {
List<Record> list = queryResult.getList(Record.class);
List<Map> recordList = Lists.transform(list, new Function<Record, Map>() {
@Override
public Map apply(Record input) {
return ImmutableMap.of("realName",input.get("rel_name"),"imgUrl",input.get("img_url"),
"sex",input.get("sex"));
}
});
}
需要数据库是snake下划线的,javaApi太多希望是驼峰式,有没有一个比较通用的方式可以将数据库load的字段,转为驼峰式返回