mybatis的多参数传递,使用
2024-09-07 11:32:34
1.mybatis的多参数使用
mapper 使用
通过@param注解,传递到xml中的参数名称指定
public interface RedisInstanceTypesMapper extends BaseMapper<RedisInstanceType> { ;
List<RedisInstanceType> queryInstanceTypes(@Param("pinAlias") String pin, @Param("az") String az);
}
2.xml使用
<select id="queryInstanceTypes" resultType="fama.cost.dao.entity.RedisInstanceType">
select s.*
from fama_redis_instance_types s
where s.pin_alias = #{pinAlias}
and az = #{az}
</select>
最新文章
- enote笔记语言(1)
- 2015 Multi-University Training Contest 1 - 1009 Annoying problem
- python 异常类型
- Elasticsearch template configuration
- dblink 的源数据表结构修改后在存储过程里执行报错
- linux Tomcat restart脚本简单版
- ASP.NET 查询客户端请求IP地址
- JS对undefined,null,NaN判断
- 正则语言(转的 大额_skylar )
- resharper 设置代码颜色
- .net软件反编译笔记
- linux 3.10 串口注册
- Ionic APP-Web SPA开发进阶(二)Ionic进阶之路由去哪了
- pyinstaller
- openstack-KVM安装与使用
- weex 开发踩坑日记--环境配置、安卓运行、adb、开发
- android: 使用本地广播
- 【洛谷P3884 [JLOI2009]】二叉树问题
- 转 DataTorrent 1.0每秒处理超过10亿个实时事件
- Jsp程序要在Tomcat下运行