Mapper里面返回List,就是说Mapper里面的方法声明是 public Listdao、service层也作相应修改,改为返回List> SELECT count(*) value, c. NAME label, ifnull(b.device_status, 0) device_statusFROM td01_device aLEFT OUTER JOIN td06_device_status b ON a.id = b.device_idLEFT OUTER JOIN td05_dd_device_status c ON c.ID = ifnull(b.device_status, 0)GROUP BY ifnull(b.device_status, 0), c. NAMEORDER BY device_status public interface OnlineStatMapper {public List> selectOnlineRateCurrent();}
拆分:将map拆分成List结构,KeyValue: String, Object