Use of MybatisPlus like

Four usages of like:

like(boolean condition, String column, String value)
like(String column, String value)
like(boolean condition, String column, String value, SqlLike type)
like(String column, String value, SqlLike type)

condition is some conditions, you can only add your sql
column as the database attribute
value is the value you pass in as
type% spell it over there:    
    SqlLike is the enumeration class
    LEFT ("left", "left%"),
    RIGHT ("right", "right%"),
    CUSTOM ("custom", "custom"),
    DEFAULT ("default", "both sides");

 

At this time, sql is like 'name%'

Published 115 original articles · Like 58 · Visits 160,000+

Guess you like

Origin blog.csdn.net/luChenH/article/details/102459924