<select id="finduserbylikename" parameterType="string" resultMap="courseResult">
select * from course where 1=1
<if test="_parameter!=null and _parameter!=''">
and name like #{_parameter}
</if>
</select>
<select id="finduserbylikename2" parameterType="map" resultMap="courseResult">
<bind name="pattern" value="'%' + _parameter.name + '%'" />
select * from course where 1=1
<if test="_parameter.name!=null and _parameter.name!=''">
and name like #{pattern}
</if>
</select>