25 lines
718 B
Go
25 lines
718 B
Go
package controller
|
|
|
|
import (
|
|
"electricity_bill_calc/config"
|
|
"electricity_bill_calc/logger"
|
|
"electricity_bill_calc/response"
|
|
"electricity_bill_calc/security"
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
var foundLog = logger.Named("Handler", "Foundation")
|
|
|
|
func InitializeFoundationHandlers(router *fiber.App) {
|
|
router.Get("/norm/authorized/loss/rate", security.MustAuthenticated, getNormAuthorizedLossRate)
|
|
}
|
|
|
|
func getNormAuthorizedLossRate(c *fiber.Ctx) error {
|
|
foundLog.Info("获取系统中定义的基准核定线损率")
|
|
result := response.NewResult(c)
|
|
BaseLoss := config.BaseLoss
|
|
return result.Success("已经获取到系统设置的基准核定线损率。",
|
|
fiber.Map{"normAuthorizedLossRate": BaseLoss},
|
|
)
|
|
}
|