This commit is contained in:
@jyuhsin
2025-08-25 10:26:01 +08:00
parent fcd57ead6c
commit dde0dc9610
70 changed files with 1863 additions and 2739 deletions
@@ -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);