上一页 1 ··· 17 18 19 20 21

2023年3月3日

生成19位long型唯一数字id

摘要: /** * 生成19位long型唯一数字id * @return */ public static long GetLong19UUID() { // String nanoRandom = System.nanoTime() + "" + random.nextInt(99999); Simple 阅读全文

posted @ 2023-03-03 08:40 五官一体即忢 阅读(434) 评论(0) 推荐(0) 编辑

Mybatis动态SQL语句大全

摘要: 读完这篇文章里你能收获到 Mybatis动态SQL语句大全 Mybatis中如何定义变量 Mybatis中如何提取公共的SQL片段 1. If 语句 需求:根据作者名字和博客名字来查询博客!如果作者名字为空,那么只根据博客名字查询,反之,则根据作者名来查询 <!--需求1: 根据作者名字和博客名字来 阅读全文

posted @ 2023-03-03 08:37 五官一体即忢 阅读(34) 评论(0) 推荐(0) 编辑

json字符串转Map集合

摘要: /** * json字符串转list * @param jsonStr * @return */ public static List<Map<String,Object>> GetJsonListByString(String jsonStr){ List<Map<String, Object>> 阅读全文

posted @ 2023-03-03 08:35 五官一体即忢 阅读(103) 评论(0) 推荐(0) 编辑

获取所有行政区划代码的最高级,用于sql的like查询

摘要: /** * 获取所有行政区划代码的最高级 用于sql的like查询 * @param regionCodeLevels * @return */ public static List<String> getAllFirstRegionCode(String regionCodeLevels){ Li 阅读全文

posted @ 2023-03-03 08:32 五官一体即忢 阅读(32) 评论(0) 推荐(0) 编辑

2023年2月16日

集合去重,根据元素中某个字段去重

摘要: 1、流过滤(推荐) //AppIspArea::getRegionCode是键映射函数,它告诉toMap收集器使用RegionCode字段作为键。Function.identity()是值映射函数,它表示值就是条目本身。 // 最后的lambda表达式(existing, replacement) 阅读全文

posted @ 2023-02-16 08:34 五官一体即忢 阅读(17) 评论(0) 推荐(0) 编辑

2023年2月9日

获取两个时间节点之间的月份列表

摘要: private static List<String> getMonthBetween(String minDate, String maxDate){ ArrayList<String> result = new ArrayList<String>(); try { SimpleDateForma 阅读全文

posted @ 2023-02-09 11:52 五官一体即忢 阅读(23) 评论(0) 推荐(0) 编辑

上一页 1 ··· 17 18 19 20 21

导航