悠然哈哈哈

导航

2023年4月23日 #

Linux 删除 No such file or directory

正文内容加载中...

posted @ 2023-04-23 17:31 悠然886 阅读(1) 评论(0) 推荐(0) 编辑

2023年4月7日 #

Java 判断是否是数字 正则表达式

摘要: private static boolean isInteger(String str) { // 可以包含小数 Pattern pattern = Pattern.compile("^[0-9]+(.[0-9]+)?$"); // 只包含两位小数 Pattern pattern=Pattern.c 阅读全文

posted @ 2023-04-07 17:03 悠然886 阅读(54) 评论(0) 推荐(0) 编辑

2022年1月4日 #

Oracle相同ID有多条记录,取时间最近的一条

摘要: select * from (select t.*, row_number() over(partition by t.strcaseid order by t.cu_date desc) rn from b_push t) c where rn = 1; ———————————————— 版权声明 阅读全文

posted @ 2022-01-04 16:37 悠然886 阅读(433) 评论(0) 推荐(0) 编辑

2021年11月30日 #

Java8实现分页

摘要: import cn.hutool.json.JSONUtil; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; public class Test { public stat 阅读全文

posted @ 2021-11-30 16:20 悠然886 阅读(738) 评论(0) 推荐(0) 编辑

java 8 新特性

摘要: JAVA8新特性之List的各种用法(最大、最小、平均值、分组、求和、遍历、过滤、排序)https://www.cnblogs.com/Kevin-ZhangCG/p/14918181.html //day 为user的一个属性 去重List<User> setList = eachUser.str 阅读全文

posted @ 2021-11-30 15:32 悠然886 阅读(47) 评论(0) 推荐(0) 编辑

2021年11月4日 #

Assert.isTrue 用法

摘要: String shippWay = "MM"; boolean expression = shippWay.equals(ShippingWayEnum.ZT.getCode()); System.out.println("Assert.isTrue报错"); shippWay = "ZT"; ex 阅读全文

posted @ 2021-11-04 12:16 悠然886 阅读(2539) 评论(0) 推荐(0) 编辑

2021年10月9日 #

分页

摘要: List<PushInfo> models = this.findByStatus(whCode, statusList,pushNum,2); if (models.isEmpty()) { return; } int pageSize = 500;// 条数 int listCount = mo 阅读全文

posted @ 2021-10-09 16:27 悠然886 阅读(17) 评论(0) 推荐(0) 编辑

2021年8月25日 #

java 8 去重

摘要: // 取差集 List<SoDetail> chajiDetails = SoDetailList.stream() .filter(item -> !upSoDetailList.stream() .map(e -> e.getSkuCode()) .collect(Collectors.toLi 阅读全文

posted @ 2021-08-25 14:36 悠然886 阅读(776) 评论(0) 推荐(0) 编辑

jdk 8 list 转map Duplicate key 报错

摘要: 根据状态分组 //原来写法Map<String, SoDetail> upDetailMap = upSoDetailList.stream().collect(Collectors.toMap(SoDetail::getStatus, item -> item));//正确写法Map<String 阅读全文

posted @ 2021-08-25 09:07 悠然886 阅读(83) 评论(0) 推荐(0) 编辑

2021年8月6日 #

jdk 8 交集 差集

摘要: import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; public class Test { public static void main(String[] args) { Li 阅读全文

posted @ 2021-08-06 10:32 悠然886 阅读(197) 评论(0) 推荐(0) 编辑