|
@@ -1,7 +1,7 @@
|
|
package main
|
|
package main
|
|
|
|
|
|
import (
|
|
import (
|
|
- "cicv-data-closedloop/amd64/report-server/handler"
|
|
|
|
|
|
+ "cicv-data-closedloop/amd64/web-server/handler"
|
|
"cicv-data-closedloop/common/config/c_db"
|
|
"cicv-data-closedloop/common/config/c_db"
|
|
"cicv-data-closedloop/common/config/c_log"
|
|
"cicv-data-closedloop/common/config/c_log"
|
|
"cicv-data-closedloop/common/gin/middleware"
|
|
"cicv-data-closedloop/common/gin/middleware"
|
|
@@ -67,9 +67,11 @@ func main() {
|
|
router.Use(middleware.ValidateHeaders(ApplicationYaml.Web.WhiteList, ApplicationYaml.Web.Token)) // 全局请求头校验
|
|
router.Use(middleware.ValidateHeaders(ApplicationYaml.Web.WhiteList, ApplicationYaml.Web.Token)) // 全局请求头校验
|
|
// 通过路由组设置全局前缀
|
|
// 通过路由组设置全局前缀
|
|
projectPrefix := router.Group(ApplicationYaml.Web.RoutePrefix)
|
|
projectPrefix := router.Group(ApplicationYaml.Web.RoutePrefix)
|
|
- // 接口
|
|
|
|
- projectPrefix.POST("/page", handler.Page) // 分页查询
|
|
|
|
- //projectPrefix.POST("/pdf", handler.Hello) // pdf下载
|
|
|
|
|
|
+ reportPrefix := projectPrefix.Group("/report")
|
|
|
|
+ reportPrefix.POST("/page", handler.Page) // 分页查询
|
|
|
|
+ //reportPrefix.POST("/pdf", handler.Hello) // pdf下载
|
|
|
|
+ monitorPrefix := projectPrefix.Group("/monitor")
|
|
|
|
+ monitorPrefix.POST("/save", handler.SaveMonitor)
|
|
// 端口
|
|
// 端口
|
|
err := router.Run(":" + ApplicationYaml.Web.Port)
|
|
err := router.Run(":" + ApplicationYaml.Web.Port)
|
|
if err != nil {
|
|
if err != nil {
|