use it like this
```java
public interface NoticeMapper {
@MapKey("status")
@MapValue("count")
Map<Integer, Integer> groupStatus();
}
```
```xml
<mapper namespace="org.apache.ibatis.submitted.mapkey_value.NoticeMapper">
<resultMap id="groupStatusMap" type="hashmap">
<result column="count" javaType="Integer" property="count"/>
<result column="status" javaType="Integer" property="status"/>
</resultMap>
<select id="groupStatus" resultMap="groupStatusMap">
select count(*) as count , status
from notice group by status
</select>
</mapper>
```