mapper.xml文件
<select id="getData" parameterType="map" resultType="hashmap">
SELECT num FROM table
</select>
list里面是个map。其中num字段在mysql中tinyint型,界面接收的num值是true,false
解决方案:
<select id="getData" parameterType="map" resultType="hashmap">
SELECT num *1 FROM table
</select>
08-16
1180
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-21
659
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)