Closed hang2ran closed 2 months ago
JDK版本: openjdk_8_412 hutool版本: 5.8.16,,测试了5.8.29,问题依旧存在
//获取今日之前一周的时间的订单,用来查询订单 System.out.println(DateUtil.lastWeek()); log.info("测试日期 {}",DateUtil.lastWeek()); param.put("date_start", DateUtil.lastWeek().toString()); param.put("date_startttttt", DateUtil.lastWeek());
//这是工具类内部的实现办法
public static DateTime lastWeek() { return offsetWeek(new DateTime(), -1); }
2024-06-28 09:45:21 09:45:21.044 [xxl-job, JobThread-1-1720143921022] INFO c.r.f.t.y.j.i.a.yeBianJiaKeDingDanAutoTask - [xxx,80] - 测试日期 2024-06-28 09:45:21 {"order_grp_id":"","order_cond_date_type":"CREATE_DATE","so_co_serial":"","act_id":[34,15,27,33,16,1,2,3,7,8,9,10,11,5,12,13,31,4,14,28,32,35,38,39,40,36,37],"so_staff_code":"","cell_code":"","date_end":"2024-07-05 09:45:21","owner_district":"100009391551126","prod_id":"97","date_start":"2024-06-28 09:45:21","is_city":"","districtIdList":["100009391551126","100009391551193","100009391551194","100009391551195","100009391551196","100009391551197","1094","1096","1156","1157","1160"],"date_startttttt":1719539121044,"limit":10,"ext_numb":"","cust_name":"","page":1,"state":"","alarm_delay_flag":"","order_id":""}
这种为什么会出现这种情况呢
你可以看下JSON规范。
在JSON中,日期使用时间戳表示,你put进去的是Date对象,会转为时间戳。
如果想显示格式化后的日期。可以:
JSONConfig.setDateFormat
版本情况
JDK版本: openjdk_8_412 hutool版本: 5.8.16,,测试了5.8.29,问题依旧存在
问题描述(包括截图)
//这是工具类内部的实现办法
这种为什么会出现这种情况呢