Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error: Method queryTotal execution error of sql :
Error reason:
the user-defined SQL is written in mapper, where is added too much, and the user-defined SQL is transferred into querywrapper, where cannot be added
error code:
String customSql="select * from ("+queryAll+") as q where ${ew.customSqlSegment}";
@Select(customSql)
IPage<BranchBasic> baseQuery(Page<Object> objectPage, @Param(Constants.WRAPPER)QueryWrapper queryWrapper);
Correct code:
as both case and upper case are OK
String customSql="select * from ("+queryAll+") as q ${ew.customSqlSegment}";
@Select(customSql)
IPage<BranchBasic> baseQuery(Page<Object> objectPage, @Param(Constants.WRAPPER)QueryWrapper queryWrapper);
Read More:
- [Solved] SQL Error: Method queryTotal execution error of sql
- [Solved] java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corres
- java.sql.SQLException: Disk full (/tmp/#sql_1eaa2_60.MAI); waiting for someone to free some space
- Bulk Update Error: #Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the m
- [Linux Docker Mirror] MYSQL Run sql Script Error: Failed to open file ‘/home/mydatabase.sql‘, error: 2
- [Modified] Hive SQL Error: SQL ERROR [10004] [42000]: Error while compiling statement: FAILED: SemanticException [Error
- ORA-04088: error during execution of trigger [How to Solve]
- Can mybatis prevent SQL injection
- MYSQL reported Fatal error encountered during command execution solution
- MySQL startup error: vcruntime140_1.dll cannot be found, unable to continue code execution
- Introduction to Relational Databases in SQL
- SQL Server Deletes a table foreign key constraint Error [Solved]
- MySQL 8.0.12 runs SQL error #1055 [How to Solve]
- [Solved] hive sql Error: ParseException in subquery source
- [Solved] Pyodbc.ProgrammingError: No results. Previous SQL was not a query.
- How to Solve SQL state [HY000]: general error 2503
- SQL statement to calculate the distance between two coordinates
- SQL editor and reconnect [an exception when MySQL (workbench) updates data] [error code: 1175]
- Lock request time out period exceeded. (Microsoft SQL Server, Error: 1222)
- SQL server converts multiple lines into one line, separated by characters