您的位置:首页 > 其它

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

2017-08-30 11:47 162 查看
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中#{ }中传入对应的键。就可以传多个参数

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: