Caused by: com.baomidou.mybatisplus . core.exceptions.MybatisPlusException : Error: Method queryTotal execution error of sql :
SELECT COUNT(1) FROM ( SELECT id,third_ code,amount,target_ data,code,target_ id,target_ amount,refund_ time,refund_ res,channel,verify_ time,type,expired_ time,uid,cancel_ time,create_ time,merid,pay_ id,use_ expired_ time,status FROM uni_ order
WHERE (code = ?AND uid IN () AND merid = ?AND channel = ?AND type = ?AND create_ time >= ?AND create_ time < ?AND status <> ?) ORDER BY id DESC ) TOTAL
General SQL execution error
After reading the diary carefully, I found that the uid of SQL where condition did not pass the value
My mistake case:
The UIDs is not null, but the size is 0, so this condition is passed. But my UIDs has no value, so it is solved by adding the size judgment
Conclusion:
The condition in where may have no value, so an error will be reported: SQL execution error
Read More:
- Mybatis automatically generated SQL error
- Springboot + mybatis + logback does not print SQL problems on the console
- Log search of SQL execution on distributed green plus database master
- Mybatis database error java.sql.SQLException : Error setting driver on UnpooledDataSource. Caus
- Execution Error SQL_ERROR_INFO: near “.“: syntax error
- The jar package download of Maven project appears (could not transfer artifact. Org mybatis:mybatis )
- Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the
- Error: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2
- Failed to retrieve plugin descriptor for org.mybatis.generator :mybatis-generator
- Difference between isempty method and isblank method in stringutils
- SAP SQL error “SQL code: -10692“ occurred while accessing table “ZTXXXX“.
- Spring data JAP SQL error:17059 SQL State:99999
- “Method does not override method from its superclass”
- SQL 2005 remote connection error (provider: SQL network interface, error: 28 – the server does not support the requested protocol
- This function has none of deterministic, no SQL, or reads SQL data in its error records
- DB2 SQL ERROR: SQLCODE=-803, SQLSTATE=23505, SQL
- SQL state [null]; error code [0]; Error; nested exception is java.sql.SQLException: Error] with root
- Hive view execution plan
- Group by operator of hive execution plan
- How to Solve mybatis returns null when querying Oracle database with char type field