摘要:
//list集合根据某字段获取某个对象 List<User> list = new ArrayList<>(); User user1 = new User(); user1.setCode("apple"); user1.setName("苹果"); list.add(user1); User u 阅读全文
摘要:
//list集合根据某字段获取某个JSONObject JSONArray list = new JSONArray(); JSONObject json1 = new JSONObject(); json1.put("code","apple"); json1.put("name","苹果"); 阅读全文
摘要:
-- oracle分组排序取出每组顺序第一条 select * from ( select row_number() over(partition by user_code order by create_time desc) rn, t.* from your_table t ) where rn 阅读全文
摘要:
-- 列转行拼接 select stuff((select ','+字段名 from 表名 for xml path('')),1,1,'') -- 示例 select stuff((select ','+user_name from t_user for xml path('')),1,1,'') 阅读全文
摘要:
List<Integer> list = new ArrayList<>(); int size = list.size(); int batchSize = 10; for (int i = 0; i < size; i += batchSize) { int fromIndex = i; int 阅读全文