From 23bd719cebe5feeff4e48fde925b0b39755eea93 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 15 十一月 2022 10:59:50 +0800 Subject: [PATCH] 2022.11.15 --- src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt b/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt index 0c5c79a..c72ed52 100644 --- a/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt +++ b/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt @@ -1,11 +1,15 @@ package cn.flightfeather.supervision +import cn.flightfeather.supervision.common.nlp.NlpController import cn.flightfeather.supervision.websocket.MsgType import cn.flightfeather.supervision.websocket.PersonalServerMsgVo import cn.flightfeather.supervision.websocket.WebSocketMsg import com.google.gson.Gson import org.junit.Test import org.springframework.boot.json.GsonJsonParser +import java.time.LocalDate +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter import java.util.* import java.util.regex.Pattern @@ -71,4 +75,32 @@ d.time = 1666262747 println(d) } + + @Test + fun foo5() { + val n = NlpController() + n.execute("鍚冭嫻鏋�") + } + + @Test + fun foo6() { + var a = 1667377808L + a*=1000 + println(a) + } + + @Test + fun foo7() { + var s = "2022/10-12" + val list = s.split("-") + val endM = list[1].toInt() + val list2 = list[0].split("/") + val year = list2[0].toInt() + val startM = list2[1].toInt() +// s = s.replace("/", "-") + val st = LocalDateTime.of(year, startM, 1, 0, 0, 0, 0) + val et = LocalDateTime.of(year, endM, 1, 0, 0, 0, 0).plusMonths(1) + println(st) + println(et) + } } \ No newline at end of file -- Gitblit v1.9.3