perf: 重构目录结构
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
libGlobal "be.ems/lib/global"
|
||||
"be.ems/src/framework/config"
|
||||
"be.ems/src/framework/resp"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -29,9 +27,9 @@ type IndexController struct{}
|
||||
// @Description Root Route
|
||||
// @Router / [get]
|
||||
func (s *IndexController) Handler(c *gin.Context) {
|
||||
name := "OMC"
|
||||
version := libGlobal.Version
|
||||
// str := "欢迎使用%s核心网管理平台,当前版本:%s,请通过前台地址访问。"
|
||||
str := "%s Core Network Management, current version: %s"
|
||||
c.JSON(200, resp.OkMsg(fmt.Sprintf(str, name, version)))
|
||||
c.JSON(200, resp.OkData(map[string]any{
|
||||
"name": "OMC",
|
||||
"version": config.Version,
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package service
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"be.ems/lib/global"
|
||||
"be.ems/src/framework/config"
|
||||
"be.ems/src/framework/constants"
|
||||
"be.ems/src/framework/utils/machine"
|
||||
@@ -26,8 +25,8 @@ type Commont struct {
|
||||
func (s *Commont) SystemConfigInfo() map[string]string {
|
||||
infoMap := map[string]string{}
|
||||
// 获取打包注入的全局变量信息
|
||||
infoMap["version"] = global.Version
|
||||
infoMap["buildTime"] = global.BuildTime
|
||||
infoMap["version"] = config.Version
|
||||
infoMap["buildTime"] = config.BuildTime
|
||||
// 系统首次使用标记
|
||||
launchInfo := machine.LaunchInfo
|
||||
if launchInfo != nil {
|
||||
|
||||
Reference in New Issue
Block a user