07 2021 档案

摘要:1、Configuration配置类中新增分页 /** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); } 2、测试类 //分页查询 阅读全文
posted @ 2021-07-14 18:02 64Byte 阅读(350) 评论(0) 推荐(0)
摘要:1、jar <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.70</version> <exclusions> <exclusion> <groupId>*</gro 阅读全文
posted @ 2021-07-14 17:01 64Byte 阅读(569) 评论(0) 推荐(0)
摘要:一、逻辑删除 1、添加字段,默认值为0(或者使用 this.setFieldValByName("deleted",0,metaObject);) 2、实体类,添加属性 @TableLogic private Integer deleted; 3、Configuration配置类中新增,逻辑删除插件 阅读全文
posted @ 2021-07-12 22:22 64Byte 阅读(210) 评论(0) 推荐(0)
摘要:mysql随机生成id @Data @AllArgsConstructor @NoArgsConstructor public class User { //@TableId(type = IdType.ID_WORKER) //mp自带策略,生成19位值,数字类型使用这种策略,比如long //@ 阅读全文
posted @ 2021-07-12 21:06 64Byte 阅读(514) 评论(0) 推荐(0)