函数:
List<Variable> searchVarsInNames(@Param("names") List<String> names,@Param("uid") long uid);
Mapper.xml:
<select id="searchVarsInNames" resultType="com.hyt.myapp.entity.Variable"> select .... from .... where create_uid=#{uid} and name in <foreach collection="names" item="name" index="index" open="(" separator="," close=")"> #{name} </foreach> </select>
确实挺别扭的,而且注解里还不能用,只能被动适应了。
END