Comments (2)
`
public class SqlPaginationInnerInterceptor extends PaginationInnerInterceptor {
public SqlPaginationInnerInterceptor(DbType dbType) {
super(dbType);
}
@Override
protected String lowLevelCountSql(String originalSql) {
int index = originalSql.indexOf("order");
if (index > 0) {
String sql = originalSql.substring(0, index);
return super.lowLevelCountSql(sql);
}
return super.lowLevelCountSql(originalSql);
}
}
`
折中办法
from mybatis-plus.
用格式提供完整的sql,
SELECT model.DM AS id,
FROM V_CUSTOMER model
LEFT JOIN v_vipset v(nolock) ON model.dm=v.gkdm
LEFT JOIN kehu(nolock) ON model.ckdm=kehu.khdm
LEFT JOIN dianyuan AS d(nolock) ON v.JSDY=d.dydm
WHERE 1=1
AND (model.DM like '%LD00000081%'
OR model.GKMC like '%LD00000081%'
OR model.SJ like '%LD00000081%')
ORDER BY v.xfje ASC
如果你的原始sql是这样的,那都无法执行,如果你后面还有些字段什么的,请提供解析错误的日志。
from mybatis-plus.
Related Issues (20)
- [错误报告]: 3.5.3.1版本,数据库是tdengine 使用selectMaps查询到数据但报ResultMapException异常 HOT 1
- [错误报告]: entity如何加载接口属性字段? HOT 1
- [错误报告]: 遇到的问题: postgresql使用lambdaUpdate().update(T entity) 生成SQL异常 HOT 6
- [功能改进]: 解决分页插件必须指定单个参数@Param的思路 HOT 2
- [错误报告]: 使用自定义PostInitTableInfoHandler报错 HOT 1
- [错误报告]: 指定scanBasePackages对于@Mapper注解扫描不生效 HOT 2
- [错误报告]: 调用批量插入方法插入已成功返回false HOT 5
- [功能改进]: wrapper.select(Class<T> entityClass, Predicate<TableFieldInfo> predicate) 无法排除主键 HOT 7
- [错误报告]:在多数据源中,使用批量新增 saveBatch 异常 HOT 1
- [错误报告]: 数据库采用PostgreSQL时并发执行saveBatch出现数据错乱,同样的代码用MySQL数据库未发现
- [错误报告]: updateWrapper无法正确处理pg 的 jsonb字段映射 HOT 1
- [错误报告]: 描述升级mybatis-plus-boot-starter的版本3.3.2到3.5.7之后,报错com.baomidou.mybatisplus.extension.parsers不存在 HOT 1
- [错误报告]: 分页查询中,Page.getRecords返回的列表所有元素均为null HOT 1
- [功能改进]: 代码生成器支持TypeHandler
- [错误报告]: 描述 乐观锁更新失败不会主动抛出异常 HOT 2
- 如何实现递归查询? HOT 1
- [错误报告]: 描述 关于过滤多租户插件使用@InterceptorIgnore的问题 HOT 1
- [错误报告]: 使用行行比较语法,解析报错:Failed to process, please exclude the tableName or statementId. HOT 2
- [错误报告]: 使用行行比较语法,解析报错
- [错误报告]: 使用LambdaQueryWrapper、LambdaUpdateWrapper或者QueryWrapper、UpdateWrapper运行IService中的update和remove方法有一定几率报错 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mybatis-plus.