<select id="search" parameterType="hashmap"resultType="com.test.User">
select id as Id,
from user
where
score >= 0
<if test="name!=null"> and pname like CONCAT(CONCAT('%',
#{name}), '%') </if>
<if test="list!=null">
and channel_id in
<foreach collection="list" index="index" open="(" close=")"
separator="," item="itm">
#{itm}
</foreach>
</if>
<if test="m != null">
limit #{m},#{n}
</if>