In the SpringBoot project, use Mybatis to dynamically create sql statements and how to insert OR conditions between loop inserts Where

first post the code for dynamically creating sql

AND();
for (Object key : key_values){
     WHERE("(article.title LIKE "%"+key.toString()+"%" OR article.content LIKE "%"+key.toString()+"%")");
}

the final output SQL statement is as follows

clipboard.png

clipboard.png

is there any way to achieve it? I looked at AbstractSQL.class and didn"t seem to find a match.

Jul.14,2022

has a OR (); , document has examples

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e8303b-c23.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e8303b-c23.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?