mybatisplus 模糊查询like

1、mybatisPlus_eq 实现类似


    AND a = #{a}


 

Wrapper wrapper= Condition.create().eq(VerifyUtil.isNNull(sysOffice.getParentId()),"PARENT_ID",sysOffice.getParentId());
 
VerifyUtil.isNNull(sysOffice.getParentId()),"PARENT_ID",sysOffice.getParentId());

2、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 是一些条件,符合才可加上你的sql
column 为 数据库属性
value 为 你传入的值
type 为 % 拼在那边:    
    SqlLike 为枚举类
    LEFT("left", "左边%"),
    RIGHT("right", "右边%"),
    CUSTOM("custom", "定制"),
    DEFAULT("default", "两边%");

你可能感兴趣的:(mybatisplus 模糊查询like)