流式编程
List<StudentCardInfoDTO> studentCardDTOS
List<String> imeiList = studentCardDTOS.stream()
.map(StudentCardInfoDTO::getImei)
.distinct().collect(Collectors.toList());
Map<Long, OCardCallBackVO> tblCardMap = tblCardList.stream().collect(Collectors.toMap(OCardCallBackVO::getTenantId,
Function.identity(), (key1, key2) -> key2, LinkedHashMap::new));
List<TblCard> collect = map.values().stream()
.filter(tblCard -> orgId.equals(tblCard.getOrgId()))
.collect(Collectors.toList());
判空遍历
Optional.of(cardIdList).ifPresent(va ->{
va.forEach(cardId ->{
});
});
Mybatis 插入语句返回主键
<insert id="batchInsert" parameterType="java.util.List" keyProperty="teacherId" useGeneratedKeys="true">
端口占用
netstat -ano|findstr "8080"
taskkill /F /pid PID
sudo lsof -i :8080
kill-9 pid