mybatis简单类型查询
2016-04-01 00:00
281 查看
第一种写法 使用@Param(value="pinyin") List<EmployeeinfoCustom> selectEmpListByPinYin(@Param(value="pinyin")String pinyin)throws Exception; <select id="selectEmpListByPinYin" parameterType="java.lang.String" resultType="com.hrm.entity.emp.EmployeeinfoCustom"> select * from employeeinfo <where> <if test="#{pinyin!=null}"> pinyin like "%"#{pinyin}"%" </if> </where> </select> 第二种写法 List<EmployeeinfoCustom> selectEmpListByPinYin(String pinyin)throws Exception; <select id="selectEmpListByPinYin" parameterType="java.lang.String" resultType="com.hrm.entity.emp.EmployeeinfoCustom"> select * from employeeinfo <where> <if test="#{_parameter!=null}"> pinyin like "%"#{_parameter}"%" </if> </where> </select>
相关文章推荐
- mybatis三种like查询写法
- jquery遍历json
- Java入门基础
- Java运算符
- 2016年4月1日有这么多新规定诞生,有影响你的生活吗?
- javascript弱语言中数据的类型转换【随笔】
- 第十章 Scala 容器(二):如何选择一个合适的容器类
- Fedora 24 Alpha带着Gnome 3.20姗姗来迟
- 企业级监控系列之一SNMP
- 企业级监控系统之二RRDTool
- 对log进行多线程C处理
- 对log进行shell方法处理
- hadoop本地模式、伪分布式模式
- hadoop计词运用
- OC归档的对象里面包括其他类的属性!
- OC的json数据解析
- OC的xml解析
- OC---xml解析实例
- OC中的NSDate类
- OC中内存管理(ARC)--注意点及单个对象处理