記錄是為了更好的成長!
1、mapper.xml描述,注意是parameterType 和 resultType
<select id="findExamineInfoByYear" parameterType="java.util.HashMap" resultType="java.util.HashMap"> select emid,datetime,totalscore,selfscore from examine ,examscore where examine.selfscore = examscore.id and examine.emid = #{emid} and examine.year = #{year} </select>
2、對應的mapper接口
List<Map> findExamineInfoByYear(Map map);
3、返回到頁面的json數據格式
[{"selfscore":4,"datetime":"2018-11-12","totalscore":"73","emid":1},{"selfscore":3,"datetime":"2018-12-12","totalscore":"32","emid":1}]
以上內容代表個人觀點,僅供參考,不喜勿噴。。。