框架:java、mybatis、oracle数据库
问题描述:
数据库查询结果如图,
mybatis查询语句如下:
<select id="getScatterData" resultType="map" fetchSize="500">
select DISTINCT tl.TIME, tl.MF
from ${table} tl
<where>
<if test="startTime != null and startTime != ''">
and tl.TIME >= to_date(#{startTime}, 'yyyy-mm-dd hh24:mi:ss')
</if>
<if test="endTime != null and endTime != ''">
and tl.TIME < to_date(#{endTime}, 'yyyy-mm-dd hh24:mi:ss')
</if>
</where>
ORDER BY tl.TIME
</select>
现在返回的是这种类型的数据,[{}, {}, {}, {}],
但是我不想要这种类型的,我想要的是这种的,[[], [], [], []],比如:
[
['2023-01-29 13:03:45', 23],
['2023-01-29 13:03:45', 43],
['2023-01-29 15:43:55', 33],
['2023-01-29 15:43:55', 13],
]
想问一下,有没有什么办法?
没这种数据格式的吧,你这个格式是应用在哪里的?传给前端?
这个是echarts的格式
