feat: 系统可暴露的配置信息
This commit is contained in:
@@ -1,16 +1,23 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"ems.agt/src/framework/vo/result"
|
||||
commonService "ems.agt/src/modules/common/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// 实例化控制层 CommontController 结构体
|
||||
var NewCommont = &CommontController{}
|
||||
var NewCommont = &CommontController{
|
||||
commontService: commonService.NewCommontImpl,
|
||||
}
|
||||
|
||||
// 通用请求
|
||||
//
|
||||
// PATH /
|
||||
type CommontController struct{}
|
||||
type CommontController struct {
|
||||
// 通用请求服务
|
||||
commontService commonService.ICommont
|
||||
}
|
||||
|
||||
// 哈希加密
|
||||
//
|
||||
@@ -18,3 +25,11 @@ type CommontController struct{}
|
||||
func (s *CommontController) Hash(c *gin.Context) {
|
||||
c.String(200, "commont Hash")
|
||||
}
|
||||
|
||||
// 系统可暴露的配置信息
|
||||
//
|
||||
// GET /sysConf
|
||||
func (s *CommontController) SysConfig(c *gin.Context) {
|
||||
data := s.commontService.SystemConfigInfo()
|
||||
c.JSON(200, result.OkData(data))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user