Mybatis传多个参数(基于注解)

publicList<XXXBean> getXXXBeanList(@Param("id")String id,@Param("code")String code); 

 

<selectid="getXXXBeanList" resultType="XXBean">

 

  select t.* from tableNamewhere id = #{id} and name = #{code} 

 

</select>  


使用@param注解 xml中#{ }中传入对应的键。就可以传多个参数


猜你喜欢

转载自blog.csdn.net/guaidaojx/article/details/77712795
今日推荐