调整局域网IP;删除蚕茧识别模块‘处理时长’字段;
This commit is contained in:
@@ -28,6 +28,12 @@ const val VIDEO_INPUT_PATH = "C:/tmp/"
|
|||||||
* ADB 秦朗FRP地址
|
* ADB 秦朗FRP地址
|
||||||
*/
|
*/
|
||||||
const val SERVER_PATH_FRP = "s3.ronsunny.cn" // 171.212.101.201
|
const val SERVER_PATH_FRP = "s3.ronsunny.cn" // 171.212.101.201
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 局域网IP 用于连接PostgreSQL和Radis
|
||||||
|
*/
|
||||||
|
const val LOCAL_IP = "10.10.12.101"
|
||||||
|
|
||||||
val gson = Gson()
|
val gson = Gson()
|
||||||
|
|
||||||
fun main(args: Array<String>): Unit = EngineMain.main(args)
|
fun main(args: Array<String>): Unit = EngineMain.main(args)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package ink.snowflake.server.controller
|
|||||||
|
|
||||||
import com.auth0.jwt.JWT
|
import com.auth0.jwt.JWT
|
||||||
import com.auth0.jwt.algorithms.Algorithm
|
import com.auth0.jwt.algorithms.Algorithm
|
||||||
|
import ink.snowflake.server.LOCAL_IP
|
||||||
import ink.snowflake.server.model.request.CommonRequest
|
import ink.snowflake.server.model.request.CommonRequest
|
||||||
import ink.snowflake.server.model.request.LoginRequest
|
import ink.snowflake.server.model.request.LoginRequest
|
||||||
import ink.snowflake.server.model.request.RefreshTokenRequest
|
import ink.snowflake.server.model.request.RefreshTokenRequest
|
||||||
@@ -38,7 +39,7 @@ import kotlin.text.Charsets.UTF_8
|
|||||||
// 配置和初始化 Redis 客户端
|
// 配置和初始化 Redis 客户端
|
||||||
fun setupRedis(): RedissonClient {
|
fun setupRedis(): RedissonClient {
|
||||||
val config = Config()
|
val config = Config()
|
||||||
config.useSingleServer().setAddress("redis://localhost:6379")
|
config.useSingleServer().setAddress("redis://"+LOCAL_IP+":6379")
|
||||||
return Redisson.create(config)
|
return Redisson.create(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,5 +21,5 @@ object ScaImagesTable : UUIDTable("sca_images") {
|
|||||||
val other_info = json("other_info", serialize = { gson.toJson(it) }, deserialize = {
|
val other_info = json("other_info", serialize = { gson.toJson(it) }, deserialize = {
|
||||||
gson.fromJson(it, object : TypeToken<Map<String, String>>() {}.type)
|
gson.fromJson(it, object : TypeToken<Map<String, String>>() {}.type)
|
||||||
})
|
})
|
||||||
val processing_time = datetime("processing_time")
|
val processing_time = float("inference_time_ms")
|
||||||
}
|
}
|
||||||
@@ -20,5 +20,4 @@ data class ImageAnalyticsRequest(
|
|||||||
val min_confidence: Float, // 最小置信度
|
val min_confidence: Float, // 最小置信度
|
||||||
val average_confidence: Float, // 平均置信度
|
val average_confidence: Float, // 平均置信度
|
||||||
val other_info: Map<String, String>, // 额外信息
|
val other_info: Map<String, String>, // 额外信息
|
||||||
val processing_time: String // 处理时间
|
|
||||||
)
|
)
|
||||||
@@ -26,8 +26,6 @@ object ImageDao {
|
|||||||
it[min_confidence] = request.min_confidence
|
it[min_confidence] = request.min_confidence
|
||||||
it[average_confidence] = request.average_confidence
|
it[average_confidence] = request.average_confidence
|
||||||
it[other_info] = request.other_info // 直接存储 JSON
|
it[other_info] = request.other_info // 直接存储 JSON
|
||||||
it[processing_time] = Timestamp.valueOf(request.processing_time)
|
|
||||||
.toLocalDateTime().toKotlinLocalDateTime()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,7 +50,6 @@ object ImageDao {
|
|||||||
min_confidence = it[ScaImagesTable.min_confidence],
|
min_confidence = it[ScaImagesTable.min_confidence],
|
||||||
average_confidence = it[ScaImagesTable.average_confidence],
|
average_confidence = it[ScaImagesTable.average_confidence],
|
||||||
other_info = it[ScaImagesTable.other_info] as Map<String, String>,
|
other_info = it[ScaImagesTable.other_info] as Map<String, String>,
|
||||||
processing_time = formatLocalDateTimeToString(it[ScaImagesTable.processing_time])
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ ktor:
|
|||||||
secret: "secret_jwt"
|
secret: "secret_jwt"
|
||||||
database:
|
database:
|
||||||
# url: "jdbc:postgresql://10.10.10.9:5432/ktor2"
|
# url: "jdbc:postgresql://10.10.10.9:5432/ktor2"
|
||||||
url: "jdbc:postgresql://localhost:5432/ktor2"
|
url: "jdbc:postgresql://10.10.12.101:5432/ktor2"
|
||||||
driver: "org.postgresql.Driver"
|
driver: "org.postgresql.Driver"
|
||||||
user: "postgres"
|
user: "postgres"
|
||||||
password: "123456"
|
password: "123456"
|
||||||
|
|||||||
Reference in New Issue
Block a user