commit
This commit is contained in:
@@ -916,8 +916,14 @@ public class BaseServiceImpl<T> extends EntityService<T> implements BaseService<
|
||||
List<Map> list = sql.getList(Map.class);
|
||||
|
||||
try {
|
||||
C c = clazz.getDeclaredConstructor().newInstance();
|
||||
List<C> voList = list.stream().map(map -> BeanUtil.fillBeanWithMapIgnoreCase(map, c, true)).toList();
|
||||
List<C> voList = list.stream().map(map -> {
|
||||
try {
|
||||
C instance = clazz.getDeclaredConstructor().newInstance();
|
||||
return BeanUtil.fillBeanWithMapIgnoreCase(map, instance, true);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Failed to instantiate or fill bean", e);
|
||||
}
|
||||
}).toList();
|
||||
return new Pagination(pageNumber, pageSize, pager.getRecordCount(), voList);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
|
||||
Reference in New Issue
Block a user