版本封存

This commit is contained in:
zeaslity
2025-12-06 11:26:05 +08:00
parent 13949e1ba8
commit c0ae5e30c4
57 changed files with 2443 additions and 1428 deletions

View File

@@ -0,0 +1,36 @@
package services
import (
"cmii-uav-watchdog-common/models"
"net/http"
"github.com/gin-gonic/gin"
)
// CMIIService CMII服务
type CMIIService struct {
authService *AuthService
}
// NewCMIIService 创建CMII服务
func NewCMIIService() *CMIIService {
return &CMIIService{
authService: NewAuthService(),
}
}
// HandleHostInfo 处理主机信息
func (cs *CMIIService) HandleHostInfo(c *gin.Context) {
// 获取主机信息
hostInfo := cs.authService.GetAllHostInfo()
// 返回单纯的主机信息
hostInfoList := make([]models.HostInfo, 0)
for _, host := range hostInfo {
hostInfoList = append(hostInfoList, host)
}
// 返回主机信息
c.JSON(http.StatusOK, hostInfoList)
}