1 2 3 4 5 ··· 13 下一页
摘要: //list集合根据某字段获取某个对象 List<User> list = new ArrayList<>(); User user1 = new User(); user1.setCode("apple"); user1.setName("苹果"); list.add(user1); User u 阅读全文
posted @ 2025-09-23 08:46 一隅桥畔 阅读(10) 评论(0) 推荐(0)
摘要: //list集合根据某字段获取某个JSONObject JSONArray list = new JSONArray(); JSONObject json1 = new JSONObject(); json1.put("code","apple"); json1.put("name","苹果"); 阅读全文
posted @ 2025-09-20 11:27 一隅桥畔 阅读(9) 评论(0) 推荐(0)
摘要: -- sql server获取当前日期的天数 select day(eecmonth('2024-12-01')) -- oracle获取当前日期的天数‌ select extract(day from last_day(sysdate)) as day_num from dual 阅读全文
posted @ 2025-01-16 18:21 一隅桥畔 阅读(32) 评论(0) 推荐(0)
摘要: -- oracle分组排序取出每组顺序第一条 select * from ( select row_number() over(partition by user_code order by create_time desc) rn, t.* from your_table t ) where rn 阅读全文
posted @ 2024-12-17 14:14 一隅桥畔 阅读(518) 评论(0) 推荐(0)
摘要: package com.lbdz.common.utils; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.regex.Mat 阅读全文
posted @ 2024-12-10 11:37 一隅桥畔 阅读(105) 评论(0) 推荐(0)
摘要: -- oracle 列转行逗号分隔 select year, listagg(sales_amount, ',') within group (order by sales_amount) as sales_amounts from sales_data group by year 阅读全文
posted @ 2024-12-05 14:06 一隅桥畔 阅读(62) 评论(0) 推荐(0)
摘要: -- 列转行拼接 select stuff((select ','+字段名 from 表名 for xml path('')),1,1,'') -- 示例 select stuff((select ','+user_name from t_user for xml path('')),1,1,'') 阅读全文
posted @ 2024-12-05 14:05 一隅桥畔 阅读(33) 评论(0) 推荐(0)
摘要: //字符串集合 BigDecimal sum = strList.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); //对象集合 BigDecimal sumValue = list.stream().ma 阅读全文
posted @ 2024-10-28 17:56 一隅桥畔 阅读(273) 评论(0) 推荐(0)
摘要: struts2上传文件时,超过了默认文件大小 查看struts.properties配置文件(默认2M) 修改文件大小(例如100M)struts.multipart.maxSize=104857600 阅读全文
posted @ 2024-07-29 18:25 一隅桥畔 阅读(83) 评论(0) 推荐(0)
摘要: List<Integer> list = new ArrayList<>(); int size = list.size(); int batchSize = 10; for (int i = 0; i < size; i += batchSize) { int fromIndex = i; int 阅读全文
posted @ 2024-07-12 17:12 一隅桥畔 阅读(103) 评论(0) 推荐(0)
1 2 3 4 5 ··· 13 下一页