SELECT COUNT(1) FROM ( ) TOTAL ] with root cause

如果遇到这个问题不要慌,继续看下面的报错

### Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error: Method queryTotal execution error of sql : 
 SELECT COUNT(1) FROM (  ) TOTAL 
] with root cause

java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') TOTAL' at line 1

如果你的项目集成mybatis/mybatisplus,那么应该是你的sql添加了判断条件,导致没有走sql,希望对小伙伴们有帮助

猜你喜欢

转载自blog.csdn.net/guochengabcd/article/details/114867143
今日推荐