至尊宝的传说
查询的结果集与result的column名对不上,可以在sum(...)添加别名。mapper中的sql改为:SELECT id, court_name, depart_name, SUM(info_1) info_1, SUM(info_2) info_2, SUM(info_3) info_3, SUM(info_4) info_4, SUM(info_5) info_5, SUM(info_6) info_6, SUM(info_7) info_7, SUM(info_8) info_8, SUM(info_9) info_9, SUM(info_10) info_10, SUM(info_11) info_11, SUM(info_12) info_12, s_month, s_year FROM caselist_info <where> <if test="courtName != null"> and court_name = #{courtName} </if> </where> GROUP BY court_name, depart_name