zhangzengfei
2024-04-29 5abbb114d703b40d2a42e9e3eecdadcb6d341dcf
controller/systemCtl.go
@@ -1,11 +1,8 @@
package controller
import (
   "gat1400Exchange/models"
   "gat1400Exchange/pkg/logger"
   "gat1400Exchange/service"
   "net/http"
   "strconv"
   "time"
   "gat1400Exchange/config"
@@ -64,16 +61,6 @@
      return
   }
   // 上报设备信息
   var d = models.Device{
      Id: req.KeepaliveObject.DeviceID,
   }
   err := d.Upsert()
   if err != nil {
      logger.Warn("Device db update camera error:%s", err.Error())
   }
   service.KeepDeviceAlive(req.KeepaliveObject.DeviceID)
   rspMsg := vo.ResponseStatus{
@@ -96,7 +83,6 @@
   }
   // 删库
   rspMsg := vo.ResponseStatus{
      RequestURL:   c.FullPath(),
      StatusCode:   vo.StatusSuccess,
@@ -110,10 +96,10 @@
// 时间校准
func (s SystemController) Time(c *gin.Context) {
   iTime, _ := strconv.ParseInt(time.Now().Format("20060102150405"), 10, 64)
   //iTime, _ := strconv.ParseInt(time.Now().Format("20060102150405"), 10, 64)
   rspMsg := vo.ResponseSystemTime{
      VIIDServerID: config.ServeConf.ID,
      LocalTime:    iTime,
      LocalTime:    time.Now().Format("20060102150405"),
   }
   c.JSON(http.StatusOK, gin.H{"SystemTimeObject": rspMsg})