mybatis查询如何返回List类型数据

只要设定resultType而不设定resultMap就可以了:

< select id = "selectByPage" parameterType = "java.util.Map"
resultType="java.util.Map" >

select rs.*, rssetting.*, cp.STOCK_CODE, cp.UNAME from RS rs
left join T_COMPANY cp on rs.uid = cp.uid
left join RS_ROADSHOW_SETTING rssetting on rssetting.rs_id = rs.id
where rs.TYPE_ID != 1
< if test = "qKeyWord != null" >
and cp.stock_code = #{qKeyWord}
if >
< if test = "rsTitle != null" >
and rs.title like #{rsTitle}
if >
order by rs.crt_time desc limit #{pageIndex}, #{pageSize}

select>

你可能感兴趣的:(java)