wangbin лет назад: 3
Родитель
Сommit
4aec139f36
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      api/v1/log/loging.go

+ 5 - 5
api/v1/log/loging.go

@@ -2,6 +2,7 @@ package log
 
 import (
 	"encoding/json"
+	"fmt"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
 	"log-server/global"
@@ -177,7 +178,7 @@ func (s *ApiLoging) GetIp(c *gin.Context) {
 		response.FailWithMessage("租机编号不能为空", c)
 		return
 	}
-	if ip.CreateDate == ""{
+	if ip.CreateDate == "" {
 		response.FailWithMessage("创建日期不能为空", c)
 		return
 	}
@@ -187,14 +188,12 @@ func (s *ApiLoging) GetIp(c *gin.Context) {
 		response.FailWithMessage("获取失败", c)
 	} else {
 		response.OkWithDetailed(response.PageResult{
-			List:     list,
-			Total:    total,
+			List:  list,
+			Total: total,
 		}, "获取成功", c)
 	}
 }
 
-
-
 // @Tags loging
 // @Summary 获取统计节点log
 // @Security ApiKeyAuth
@@ -393,6 +392,7 @@ func (s *ApiLoging) ComputerHeartbeat(c *gin.Context) {
 		return
 	}
 	num := ServiceStatisticsLog.ComputerHeartbeat(c, paramsInfo)
+	global.GVA_LOG.Warn(fmt.Sprintf("电脑上报参数pcc_code=%s Operator=%s", paramsInfo.PcCode, paramsInfo.Operator))
 	response.OkWithDetailed(num, "上报成功", c)
 }