为什么不写parameterType也可以运行成功
为什么不写parameterType也可以运行成功?写别的类型可不会报错照常执行
command.xml:
<select id="queryCommandListByPage" resultMap="CommandResult" >
select <include refid="columns"/> from command a left join command_content b
on a.id=b.command_id
<where>
<if test="command.name != null and !"".equals(command.name.trim())">
and a.name=#{command.name}
</if>
<if test="command.description != null and !"".equals(command.description.trim())">
and a.description like '%' #{command.description} '%'
</if>
</where>
<if test="flag==1">
group by aid
</if>
order by id
</select>
<sql id="columns">
a.id aid,a.name,a.description,b.content,b.id,b.command_id
</sql>
接口:
/**
* 拦截器实现分页
*/
public List<command> queryCommandListByPage(Map<String,Object>parameter);