Commit 8500b40c authored by yanzg's avatar yanzg

表结构修改

parent 6864d60d
......@@ -58,4 +58,12 @@ public class TestDateHelper {
System.out.println(json);
Assert.assertEquals("[{\"from\":\"2023-07-01 10:00:00\",\"to\":\"2023-07-01 23:59:59\"},{\"from\":\"2023-07-02 00:00:00\",\"to\":\"2023-07-02 23:59:59\"},{\"from\":\"2023-07-03 00:00:00\",\"to\":\"2023-07-03 23:59:59\"},{\"from\":\"2023-07-04 00:00:00\",\"to\":\"2023-07-04 23:59:59\"},{\"from\":\"2023-07-05 00:00:00\",\"to\":\"2023-07-05 23:59:59\"},{\"from\":\"2023-07-06 00:00:00\",\"to\":\"2023-07-06 23:59:59\"},{\"from\":\"2023-07-07 00:00:00\",\"to\":\"2023-07-07 23:59:59\"},{\"from\":\"2023-07-08 00:00:00\",\"to\":\"2023-07-08 23:59:59\"},{\"from\":\"2023-07-09 00:00:00\",\"to\":\"2023-07-09 23:59:59\"},{\"from\":\"2023-07-10 00:00:00\",\"to\":\"2023-07-10 23:59:59\"},{\"from\":\"2023-07-11 00:00:00\",\"to\":\"2023-07-11 23:59:59\"},{\"from\":\"2023-07-12 00:00:00\",\"to\":\"2023-07-12 23:59:59\"},{\"from\":\"2023-07-13 00:00:00\",\"to\":\"2023-07-13 23:59:59\"},{\"from\":\"2023-07-14 00:00:00\",\"to\":\"2023-07-14 23:59:59\"},{\"from\":\"2023-07-15 00:00:00\",\"to\":\"2023-07-15 23:59:59\"},{\"from\":\"2023-07-16 00:00:00\",\"to\":\"2023-07-16 23:59:59\"},{\"from\":\"2023-07-17 00:00:00\",\"to\":\"2023-07-17 23:59:59\"},{\"from\":\"2023-07-18 00:00:00\",\"to\":\"2023-07-18 23:59:59\"},{\"from\":\"2023-07-19 00:00:00\",\"to\":\"2023-07-19 23:59:59\"},{\"from\":\"2023-07-20 00:00:00\",\"to\":\"2023-07-20 23:59:59\"},{\"from\":\"2023-07-21 00:00:00\",\"to\":\"2023-07-21 23:59:59\"},{\"from\":\"2023-07-22 00:00:00\",\"to\":\"2023-07-22 23:59:59\"},{\"from\":\"2023-07-23 00:00:00\",\"to\":\"2023-07-23 23:59:59\"},{\"from\":\"2023-07-24 00:00:00\",\"to\":\"2023-07-24 23:59:59\"},{\"from\":\"2023-07-25 00:00:00\",\"to\":\"2023-07-25 23:59:59\"},{\"from\":\"2023-07-26 00:00:00\",\"to\":\"2023-07-26 23:59:59\"},{\"from\":\"2023-07-27 00:00:00\",\"to\":\"2023-07-27 23:59:59\"},{\"from\":\"2023-07-28 00:00:00\",\"to\":\"2023-07-28 23:59:59\"},{\"from\":\"2023-07-29 00:00:00\",\"to\":\"2023-07-29 23:59:59\"},{\"from\":\"2023-07-30 00:00:00\",\"to\":\"2023-07-30 23:59:59\"},{\"from\":\"2023-07-31 00:00:00\",\"to\":\"2023-07-31 19:00:00\"}]", json);
}
@Test
public void testSplitDay1() {
List<DateHelper.Day> days = DateHelper.splitDayTime(new DateHelper.Day("2023-7-1 10:00:00", "2023-7-1 19:00:00"));
String json = JsonHelper.serialize(days);
System.out.println(json);
Assert.assertEquals("[{\"from\":\"2023-07-01 10:00:00\",\"to\":\"2023-07-01 19:00:00\"}]", json);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment