原来写的是:
@MapKey(“team_id”) 写完测试 OK,第二天,查询报错
nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'team_id' in 'class com.gtinfo.core.vo.volunteer.VolunteerTeamTotalVo'
实际上 该vo中Getter是有的
修改为下列就好了。
@MapKey("teamId")
Map<Long, VolunteerTeamTotalVo> getVolunteerTeamCountInfo(@Param("list") List<Long> teamIdList);
看注解注释,可以是属性名或者列名。感觉好奇怪,不知道怎么回事。