Mybatis executes the query statement and can query data in plsql, but cannot be found in the program. mybatisplsql
When you use mybatis to query statements today, the SQL statements output by the console can be correctly executed in plsql, but no data is found.
The original query statement is as follows: (for confidentiality, the sensitive package name is mosaic .)
This SQL statement can be correctly executed in plsql but cannot be queried.
Solution: Replace "#" in the query condition with "$ ".
The reason is as follows: if MyBatis sees # {}, you will think that you are assigning values to the variables in SQL, just like assigning values to question marks in JDBC programming (automatically adding single quotation marks before and after) That is to say, he regards the string you passed in as not multiple values, but as a large string, so no value can be found)
When MyBatis sees $ {}, it will directly replace it with the variable value without any processing.