mybatis-plus wrapper exists的正确用法
mybatis-plus wrapper exists正确用法
·
官网给的demo
exists(String existsSql)
exists(boolean condition, String existsSql)
exists("select id from table where age = 1")
--->exists (select id from table where age = 1)
新版本mybatis-plus 有三个参数
Children exists(String existsSql, Object... values);
Children exists(boolean condition, String existsSql, Object... values);
用法要有改变,原来那么用也可以,但是不严谨
exists("select 1 from TABLE where id = {0} and name = {1}", "123", "456");
更多推荐
已为社区贡献2条内容
所有评论(0)