From a6e84625b91e19220933ed3bc8ef91435281ab26 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期二, 16 四月 2024 16:52:35 +0800
Subject: [PATCH] 添加服务器是否可以连接的判断
---
controller/systemCtl.go | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/controller/systemCtl.go b/controller/systemCtl.go
index 9fa0a77..8904214 100644
--- a/controller/systemCtl.go
+++ b/controller/systemCtl.go
@@ -5,6 +5,7 @@
"gat1400Exchange/pkg/logger"
"gat1400Exchange/service"
"net/http"
+ "strconv"
"time"
"gat1400Exchange/config"
@@ -109,9 +110,10 @@
// 鏃堕棿鏍″噯
func (s SystemController) Time(c *gin.Context) {
+ iTime, _ := strconv.ParseInt(time.Now().Format("20060102150405"), 10, 64)
rspMsg := vo.ResponseSystemTime{
VIIDServerID: config.ServeConf.ID,
- LocalTime: time.Now().Format("20060102150405"),
+ LocalTime: iTime,
}
c.JSON(http.StatusOK, gin.H{"SystemTimeObject": rspMsg})
--
Gitblit v1.8.0