MyBatis查询结果封装成List

来源:互联网 发布:淘宝网卖家中心不见了 编辑:程序博客网 时间:2024/06/16 03:05
<select id="associationCountByMap" resultType="java.lang.String">        select sayings_id from user_sayings_group_relation o left join user_sayings p        on o.sayings_id = p.id        where 1=1         <include refid="association_params" />    </select>

1.reslutType写List里面的元素类型,而不是List本身
2.接收方法
List associationCountByMap(@Param(“params”)Map

原创粉丝点击