报错信息:
Caused by: java.lang.ClassCastException: com.alibaba.fastjson.JSONArray cannot be cast to java.util.ArrayList
at com.bonc.ds.dataset.service.impl.SerializableDataQueryServiceImpl.lambda$query$4(SerializableDataQueryServiceImpl.java:429)
at java.lang.Iterable.forEach(Iterable.java:75)
at com.bonc.ds.dataset.service.impl.SerializableDataQueryServiceImpl.query(SerializableDataQueryServiceImpl.java:427)
at com.bonc.ds.dataset.service.impl.SerializableDataQueryServiceImpl.queryDataAndTotalCount(SerializableDataQueryServiceImpl.java:79)
at com.bonc.ds.dataset.service.impl.DataModelQueryServiceImpl.queryDataModelForSerializableDataSet(DataModelQueryServiceImpl.java:401)
at com.bonc.ds.vbap3.controller.QueryController.doQueryData(QueryController.java:956)
at com.bonc.ds.vbap3.controller.QueryController.lambda$queryData$19(QueryController.java:1025)
at com.bonc.ds.vbap3.utils.ServiceExecutor.execute(ServiceExecutor.java:69)
... 5 common frames omitted
解决办法
方法1:
将ArrayList<Integer> ids = (ArrayList<Integer>)map.get("list");
改为List<Integer> ids = (List<Integer>)map.get("list");
方法2:
将ArrayList<Integer> ids = (ArrayList<Integer>)map.get("list