08 2020 档案
摘要:Mybatis Plus 查询条件中and和or的使用: mybatis plus 查询条件默认是使用and拼接的,有的情况下我们需要自定义查询条件顺序,希望用到()或者or来进行sql语句优先级查询,所以需要 自己处理 Wrapper查询条件: 1、使用LambdaQueryWrapper进行
阅读全文
摘要:Mybatis Plus使用redis作为二级缓存 1. mybatis-plus开启二级缓存 mybatis-plus.configuration.cache-enabled=true #全局设置主键生成策略 mybatis-plus: global-config: db-config: id-t
阅读全文
摘要:自定义SQL分页查询 1、Mapper接口方法自定义 public interface RentSetMealMapper extends BaseMapper<RentSetMeal> { /** * 自定义连表查询,包含分页 * @param page * @param rentSetMealD
阅读全文