BaseMapper

2024/4/11 20:25:58

像mybatis-plus一样自定义封装BaseMapper方法

今天刷视频的时候看到说判断是否存在使用select 1 from table where *** limit 1这种语句要比&#xff0c;select count 好。所以我看一下mybatis-plus的BaseMapper中的exists方法&#xff0c;发现也是用的select count来判断的 default boolean exists(Wrapper<T> quer…