只要设定resultType而不设定resultMap就可以了:
<selectid="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
<iftest="qKeyWord != null">
and cp.stock_code = #{qKeyWord}
</if>
<iftest="rsTitle != null">
and rs.title like #{rsTitle}
</if>
order by rs.crt_time desc limit #{pageIndex}, #{pageSize}
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
<iftest="qKeyWord != null">
and cp.stock_code = #{qKeyWord}
</if>
<iftest="rsTitle != null">
and rs.title like #{rsTitle}
</if>
order by rs.crt_time desc limit #{pageIndex}, #{pageSize}
</select>
- 来源:http://blog.csdn.net/shandalue/article/details/41443603