07 2024 档案

摘要:LambdaQueryWrapper<SpotCheck> queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.in(SpotCheck::getCheckCode,checkCodes); List<SpotCheck> spotChec 阅读全文
posted @ 2024-07-18 19:52 多多指教~ 阅读(1) 评论(0) 推荐(0) 编辑
摘要:@Getter public enum DeviceCategoryEnum { METER_DEVICE("10","计量设备"), PRODUCT_DEVICE("20","生产设备"), CHECK_DEVICE("30","检测设备"), OTHER("40","其他"); private 阅读全文
posted @ 2024-07-18 19:39 多多指教~ 阅读(1) 评论(0) 推荐(0) 编辑
摘要:List<String> collect = Arrays.asList("aaa","ddd","dd");String join = String.join(",", collect);System.out.println("join = " + join); 阅读全文
posted @ 2024-07-18 19:30 多多指教~ 阅读(1) 评论(0) 推荐(0) 编辑
摘要:最近工作中老是遇到,有个模糊查询要查询子表数据的,但只展示主表数据,今天在此记录下 List<String> productCodes = new ArrayList<>(); // 先去查询子表数据 if (StrUtil.isNotEmpty(pageProductQueryReq.getFor 阅读全文
posted @ 2024-07-16 11:39 多多指教~ 阅读(1) 评论(0) 推荐(0) 编辑
摘要:实际使用中,经常遇到一个for循环里面,会有去查询数据库,为了防止这个动作,可以提前将要查询的数据查询出来,然后通过stream中的map.get(key)的方式去匹配对应 代码如下,可做参考: // 第一种是map<String,Object>List<WorkstationGroup> work 阅读全文
posted @ 2024-07-11 13:52 多多指教~ 阅读(4) 评论(0) 推荐(0) 编辑
摘要:List<DeviceSpotCheck> deviceSpotCheckList = listMap.get(deviceCode); List<String> collect = deviceSpotCheckList.stream().map(DeviceSpotCheck::getCheck 阅读全文
posted @ 2024-07-01 13:57 多多指教~ 阅读(2) 评论(0) 推荐(0) 编辑
摘要:LambdaQueryWrapper<MaintenancePlan> wrapper = new LambdaQueryWrapper<>(); if (StrUtil.isNotEmpty(queryReq.getSearchCodeAndName())){ wrapper.and(e -> e 阅读全文
posted @ 2024-07-01 13:53 多多指教~ 阅读(1) 评论(0) 推荐(0) 编辑