浏览器f12
1.请求是否发送成功(地址是否正确)
2.请求中表单数据是否一一对应(页面)
3.后台是否接收,哪一步出的错(报错与SQL有关,将SQL语句单独执行看是否有误)
<!-- 参数map,返回结果实体类对象-->
<!-- 连接条件不一样,所以连接两次-->
<!-- 从哪页开始,一页多少条记录beginNo,pageSize,拿到map里的key值-->
<select id="selectAllActivityByConditionForPage" parameterType="map" resultMap="BaseResultMap">
select a.id,a.name,u1.name as owner,a.start_date,a.end_date,a.cost,a.description,a.create_time,
u2.name as create_by,a.edit_time,u3.name as edit_by
from tbl_activity a
join tbl_user u1 on a.owner=u1.id
join tbl_user u2 on a.create_by=u2.id
left join tbl_user u3 on a.edit_by=u3.id
<where>
<if test="name!=null and name!=''">
and a.name like '%' #{name} '%'
</if>
<if test="owner!=null and owner!=''">
and u1.name like '%' #{owner} '%'
</if>
<if test="start_date!=null and start_date!=''">
and a.start_date>=#{startDate}
</if>
<if test="end_date!=null and end_date!=''">
and a.end_date<=#{entDate}
</if>
</where>
order by a.create_time desc
limit #{beginNo},#{pageSize}
</select>
4.是否缺少注解,配置文件是否正确