Mybatis plus method querytotal execution error of SQL

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: