1.xml里的sql语句千万不能有注释带在其中,像下面这样,虽然可以直接在navicat下执行,但在mybatis中行不通
<select id="getModifyUserLabMap" resultType="java.util.Map">
select
u.user_nickname tester,modify_num modifyNum,GROUP_CONCAT(lab_id) labs
from busi_project_rel_modify m,busi_lab l,tsys_user u
where m.rel_id = l.lab_id and u.user_name = l.create_by
and m.project_id = #{projectId ,jdbcType=VARCHAR}
and m.project_rel_type='3'
and l.node_type='2'
-- and l.create_time>= #{beginTime,jdbcType=VARCHAR}
-- and l.create_time <= #{endTime,jdbcType=VARCHAR}
GROUP by tester,modify_num
</select>
2.resultType和resultMap千万不能用错了,resultType用来返回java数据类型,string或map这种,resultMap用来返回前面定义好的resultMap,通过id来定位
---完善中--很多坑