我之前有一个列表,它被解析为JSON,并在另一端接收如下:
select t1.milestone_id, sum(t2.val) / count(t2.val)
from (
SELECT milestone_id, SUM(value) val
FROM project_has_tasks
WHERE project_id='10'
GROUP BY milestone_id
) t1
join (
SELECT milestone_id, SUM(value) val
FROM project_has_tasks
WHERE project_id='10'
GROUP BY milestone_id
) t2
on t1.milestone_id <= t2.milestone_id
group by t1.milestone_id
order by t1.milestone_id desc
现在我想要相同的方法,但这次我需要一个解析为JSON的HashMap,我必须作为HashMap接收。
List<Model> list = Arrays.asList(restTemplatelist.getForObject("http://dataurl, Model[].class));
但这不起作用。感谢任何帮助