摘要: 1 public class NumberUtils { 2 3 private static final String MILLION_UNIT = "万"; 4 private static final String BILLION_UNIT = "亿"; 5 private static fi 阅读全文
posted @ 2022-08-03 17:20 酷盖的小机灵 阅读(2212) 评论(0) 推荐(0) 编辑
摘要: Mon Oct 29 17:16:04 CST 2018 阅读全文
posted @ 2022-08-03 17:18 酷盖的小机灵 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 1 public class MyUtils { 2 /** 3 * 以季度分割时间段 4 * 此处季度是以 12-2月 3-5月 6-8月 9-11月 划分 5 * @param startTime 开始时间戳(毫秒) 6 * @param endTime 结束时间戳(毫秒) 7 * @param 阅读全文
posted @ 2022-08-03 17:18 酷盖的小机灵 阅读(1479) 评论(0) 推荐(0) 编辑
摘要: 1 SELECT 2 * 3 FROM 4 data a 5 WHERE 6 a.del_flag = 0 7 AND a.exchange_code IN ( 'XSHG', 'XSHE' ) 8 AND EXISTS ( 9 SELECT 10 1 11 FROM 12 ( SELECT sto 阅读全文
posted @ 2022-08-03 17:17 酷盖的小机灵 阅读(1869) 评论(0) 推荐(1) 编辑
摘要: 查询今天的信息记录: select * from `article` where to_days(`add_time`) = to_days(now()); 查询昨天的信息记录: select * from `article` where to_days(now()) – to_days(`add_ 阅读全文
posted @ 2022-08-03 17:16 酷盖的小机灵 阅读(2741) 评论(0) 推荐(0) 编辑
摘要: 查询数据库json类型 select JSON_EXTRACT( operate_detail_json, '$[0].adjustContent' ) 添加数据库json类型 update tab_json set data = json_insert(data,"$.name","小明") wh 阅读全文
posted @ 2022-08-03 17:12 酷盖的小机灵 阅读(1241) 评论(0) 推荐(0) 编辑
摘要: 1 select curdate(); -- 获取当前日期 2 select last_day(curdate()); -- 获取当月最后一天。 3 select DATE_ADD(curdate(),interval -day(curdate())+1 day); -- 获取本月第一天 4 sel 阅读全文
posted @ 2022-08-03 17:06 酷盖的小机灵 阅读(5279) 评论(0) 推荐(2) 编辑
摘要: 1 import java.util.ArrayList; 2 import java.util.List; 3 4 public class CompareTwoListUtil { 5 public static void getList(List<Long> oldGroupIdList, L 阅读全文
posted @ 2022-08-03 17:05 酷盖的小机灵 阅读(442) 评论(0) 推荐(0) 编辑
摘要: 用JDK1.8 Stream中对List进行去重: List<String> myList = list.stream().distinct().collect(Collectors.toList()); 阅读全文
posted @ 2022-08-03 17:04 酷盖的小机灵 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 1 import com.google.common.collect.Maps; 2 import org.apache.commons.lang3.StringUtils; 3 4 import java.lang.reflect.Method; 5 import java.util.ArrayL 阅读全文
posted @ 2022-08-03 17:04 酷盖的小机灵 阅读(238) 评论(0) 推荐(0) 编辑