摘要: DATE_FORMAT(time,'%Y-%m-%d %H:%i:%S') 阅读全文
posted @ 2019-09-19 17:09 四块五 阅读(18916) 评论(1) 推荐(0) 编辑
摘要: 自上而下,向下抓层级树结构: 自下而上,向上抓层级树结构: 阅读全文
posted @ 2019-09-18 16:06 四块五 阅读(846) 评论(0) 推荐(0) 编辑
摘要: System.getProperty("user.dir") 阅读全文
posted @ 2019-09-17 13:59 四块五 阅读(974) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 阅读全文
posted @ 2019-09-06 10:38 四块五 阅读(3882) 评论(0) 推荐(1) 编辑
摘要: 1.string 直接拼接 2.string.format 拼接 3.StringBuffer 拼接 4.StringBuilder 拼接 拼接字符串的速度:4 > 3 > 1 >2 总结:StringBuffer 是线程安全的,但是速度不如 StringBuilder。多个字符串尽量不要直接拼接, 阅读全文
posted @ 2019-08-26 10:29 四块五 阅读(6533) 评论(0) 推荐(0) 编辑
摘要: 大家都知道simpleDateFormat是线程不安全的,所以java8中提供了更为方便的日期类型,以及线程安全的DateTimeFormatter日期格式化方法。代码如下: Instant date = Instant.now();//代替date System.out.println("inst 阅读全文
posted @ 2019-08-22 11:27 四块五 阅读(16109) 评论(0) 推荐(0) 编辑
摘要: //对数据做分组(分组条件:组织+对象) List<Map<String,Object>> list2 = new ArrayList<>(); Map<String,Object> map1 = new HashMap<>(); map1.put("organization", "北京"); ma 阅读全文
posted @ 2019-08-21 10:59 四块五 阅读(16723) 评论(2) 推荐(0) 编辑
摘要: 1.第一种判断方式 <if test=' requisition != null and requisition == "Y" '> AND 表字段 = #{requisition}</if> 2.第二种判断方式 <if test=" requisition != null and requisit 阅读全文
posted @ 2019-08-21 10:20 四块五 阅读(13440) 评论(0) 推荐(0) 编辑
摘要: 1.对BigDecimal类型的值求和 List<Map<String,Object>> list = new ArrayList<>(); Map<String,Object> stu1 = new HashMap<String, Object>(); stu1.put("name", "卫庄") 阅读全文
posted @ 2019-08-21 10:08 四块五 阅读(32382) 评论(1) 推荐(1) 编辑
摘要: List<String> lowCaseList = new ArrayList<>(); lowCaseList.add("dog"); lowCaseList.add("cat"); lowCaseList.add("tiger"); lowCaseList.add("lion"); List< 阅读全文
posted @ 2019-08-20 20:20 四块五 阅读(6630) 评论(0) 推荐(0) 编辑