From 027bf7da7a012fa36f8835b2419c74da8b2f1c28 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 15 十一月 2022 11:00:21 +0800
Subject: [PATCH] 2022.11.15

---
 src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt b/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt
index 194d5ab..c72ed52 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/CommonTest.kt
@@ -1,11 +1,16 @@
 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
 
 /**
@@ -65,6 +70,37 @@
 
     @Test
     fun foo4() {
+        val d = Date()
+        println(d.time)
+        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