mybatais plugins(批量操作)
https://blog.csdn.net/qq_42665745/article/details/127996832
https://blog.csdn.net/gary_royal/article/details/131391343
手动下载maven
https://mvnrepository.com/artifact/com.alibaba/easyexcel/2.2.6#maven
https://blog.csdn.net/Song22311974/article/details/131325456
mvn dependency:get -DremoteRepositories=https://mvnrepository.com/artifact/de.codecentric/spring-boot-admin-starter-server/2.6.3 -DgroupId=de.codecentric -DartifactId=spring-boot-admin-starter-server -Dversion=2.6.3
excel操作
https://blog.csdn.net/m0_62946761/article/details/129750991
easypoi
https://blog.csdn.net/qq_41915325/article/details/128706126
https://blog.csdn.net/xc9711/article/details/126099859
定时任务
https://cloud.tencent.com/developer/article/2349486
Spring Cache秒杀百万级并
https://mp.weixin.qq.com/s/4DDimk_l5NwDfFsC5jB1Ww
格式化注解
https://mp.weixin.qq.com/s/ZvgzdlbwwTB9DCBQvt0EiA
idea乱码
https://doc.rg1008.com/docs/rg_pass_dev/rg_pass_dev-1echeei9m1ng0
List<RectifyQuestion> subquest=questList.stream().filter(p -> p.getCateId().equals(model.getId())).collect(Collectors.toList());
//查询问题
QueryWrapper<RectifyQuestion> queryWrapper3=new QueryWrapper();
queryWrapper3.select("id","cate_id");
queryWrapper3.eq("patrol_id" ,patrolId);
List<RectifyQuestion> questList = iRectifyQuestionService.list(queryWrapper3);
简单来说就是通过.stream().map(自定义名称 -> new 要转换的类名()).collect(Collectors.toList());
.collect:结束Stream流。
Collectors.toList():类实现了很多归约操作,例如将流转换成集合和聚合元素。Collectors 可用于返回列表或字符串
steam():把一个源数据,可以是集合,数组,I/O channel, 产生器generator 等,转化成流。
map():用于映射每个元素到对应的结果。以下代码片段使用 map 输出了元素对应的平方数:
/** modifier: cbg*/
/** 来源位置 1 集中整改 2 后续整改*/
@Excel(name = "来源位置 1 集中整改 2 后续整改")
@ApiModelProperty(value = "来源位置 1 集中整改 2 后续整改")
private Integer fromPosition;
@TableField(exist = false)
private Integer isType=0;
@TableField(exist = false)
@TableField(exist = false) 注解可以解决表中表的问题,加载bean属性上,表示当前属性不是数据库的字段,但在项目中必须使用,这样可以用来把一个数据表当作一个字段来输出,用来实现表中表数据输出。这样设置在新增等使用bean的时候,mybatis-plus就会忽略这个,不会报错
@TableField(exist = false)
private List<CtnOrderBoxInfo> boxInfos;
@TableField(exist = false)
private List<CtnOrderFee> fees;
@TableField(exist = false)
private List<CtnOrderAttachInfo> orderAttachInfos;
@TableField(exist = false)
private List<CtnRemarksHistory> remarksHistories;
eq(“from_position”, 8).or().lt(“status”, 2));
List<RectifyQuestion> questList = iRectifyQuestionService.list(queryWrapper3);
//查询措施
List<RectifyMeasures> measureList =new ArrayList<>();
if(questList.size()>0) {
String baseids = questList.stream().map(p -> String.valueOf(p.getId())).collect(Collectors.joining(","));
QueryWrapper<RectifyMeasures> queryWrapper2 = new QueryWrapper();
queryWrapper2.select("id", "question_id","status");
queryWrapper2.inSql("question_id", baseids);
// #region 通过位置 和 状态过滤
if(isType==8){
queryWrapper2.and(wrapper -> wrapper.eq("from_position", 8).or().lt("status", 2));
}else if(isType==4){
queryWrapper2.ne("from_position" ,8);
}
// #endregion 通过位置 和 状态过滤
measureList = iRectifyMeasuresService.list(queryWrapper2);
}