目录
[thinking:关于Mybatis Plus中BaseMapper和IService?](#thinking:关于Mybatis Plus中BaseMapper和IService?)
[编辑 thinking:CollUtil.isNotEmpty?](#编辑 thinking:CollUtil.isNotEmpty?)
thinking:Collection、Collections、Collector、Collectors?
[编辑编辑thinking:日志INFO DEBUG相关级别、优先级及使用方法 ?](#编辑编辑thinking:日志INFO DEBUG相关级别、优先级及使用方法 ?)
11
批量插入数据最好的方法是
1.
2.
12
thinking:关于Mybatis Plus中BaseMapper和IService?



BaseMapper<> 、IService<>与ServiceImpl<>_失败尽是常态Zzz(热爱、专注、坚持)的博客-CSDN博客
生成一个框架,但我不知道为什么我没有MybatisPlus(初音未来)那个插件?


13
最新版本的mp才有这样的功能!!!!!
避免循环注入,意思就是我在a注入b,又在b注入a这种情况

thinking:CollUtil.isNotEmpty?


14
thinking:Collection、Collections、Collector、Collectors?



jdk中提供的Collection、Collections、Collector、Collectors你分的清楚?-CSDN博客


在自己service内部,直接调getById就可以了,不用再注入了


thinking:groupBy()?
Java8 Collectors.groupingBy 按照数据库查询语句的排序 进行分组排序_collectors.groupingby 排序_ Mr. Kang的博客-CSDN博客
java
// 将不同课程的学生进行分类
Map<String, List<Student>> groupByCourse = students.stream().collect(Collectors.groupingBy(Student::getCourse));
Map<String, List<Student>> groupByCourse1 = students.stream().collect(Collectors.groupingBy(Student::getCourse, Collectors.toList()));
// 上面的方法中容器类型和值类型都是默认指定的,容器类型为:HashMap,值类型为:ArrayList
// 可以通过下面的方法自定义返回结果、值的类型
Map<String, List<Student>> groupByCourse2 = students.stream()
.collect(Collectors.groupingBy(Student::getCourse, HashMap::new, Collectors.toList()));

这篇文章讲述了groupby的详细用法。
Stream Collectors.groupingBy的四种用法 解决分组统计(计数、求和、平均数等)、范围统计、分组合并、分组结果自定义映射等问题_涝山道士的博客-CSDN博客
15

操作步骤
1.


thinking:日志INFO DEBUG相关级别、优先级及使用方法 ?



也可以将数据迁移到其他表
方便代码,增加可读性。不用看1,2,3这些数字来想这些数字代表什么意思。


16





在value上加EnumValue 因为是value这个东西需要转换 即 哪个成员变量对应数据库表中的变量

17
thinking:staticName?
这个我也不是很懂



lombok 基础注解之 @AllArgsConstructor_@allargsconstructor注解_qianbihua00的博客-CSDN博客






18






19

20
将19写的方法封装起来。








第一种方法:
