Mybatis模糊查询的写法
来源:互联网 发布:淘宝降价提醒助手 编辑:程序博客网 时间:2024/06/11 03:50
1.mybatis的like模糊查询相对于其它关键字或特殊符号装配数据比较特殊
写法: like '%${projectName}%'
样例:
SELECT IFNULL(COUNT(taskId),0) as nums FROM ( SELECT DISTINCT f.taskId as taskId, CONCAT(s.projectName,'-',s.projectNumber)AS taskName, s.departId as departId FROM jbpm4_task task LEFT JOIN jbpm4_participation pt ON pt.TASK_ = task.DBID_ JOIN process_form f ON f.taskId = task.DBID_ JOIN process_run r ON r.runId = f.runId JOIN sl_smallloan_project s ON s.projectId = r.projectId JOIN bp_product_parameter b ON s.productId = b.id WHERE task.ASSIGNEE_ = #{userId1} AND task.STATE_ = 'open' OR ( task.ASSIGNEE_ IS NULL AND pt.TYPE_ = 'candidate' AND ( pt.userId_ = #{userId2} OR pt.groupId_ = #{groupId} ) ) ) as g <where> 1=1 <if test="branchId!=null"> AND g.departId = #{branchId} </if> <if test="projectName!=null"> AND g.taskName like '%${projectName}%' </if> </where>
阅读全文
0 0
- Mybatis模糊查询的写法
- mybatis模糊查询写法
- mybatis模糊查询写法
- Mybatis中模糊查询的各种写法
- Mybatis中模糊查询的各种写法
- mybatis 模糊查询 mapper.xml的写法
- Mybatis中模糊查询的各种写法
- Mybatis中模糊查询的各种写法
- Mybatis中模糊查询的各种写法
- Mybatis中模糊查询的各种写法
- Mybatis中模糊查询的各种写法
- Mybatis中模糊查询的各种写法
- Mybatis中模糊查询的写法总结
- Mybatis中模糊查询的各种写法
- Mybatis中模糊查询的各种写法
- Mybatis中模糊查询的各种写法
- Mybatis中模糊查询的各种写法
- Mybatis中模糊查询的各种写法
- 如何编译Fribidi for i586/ARM?
- Http请求中Content-Type讲解以及在Spring MVC中的应用
- shiro讲解之 入门
- 学习笔记:LAB Feature with Feature-centric Cascade for Fast and Accurate Face Detection
- 小程序解析html富文本插件wxParse配制全面指南
- Mybatis模糊查询的写法
- Spring Cloud Eureka 入门 (二)服务提供者详解
- 卷积神经网络算法
- Python日期的加减等操作
- 字符过滤器工具类
- 解决Failed to ... maven-compiler-plugin:3.1:compile (default-compile) on project ...
- GoLang初探
- Mardown使用方法
- SVM学习资料链接