custom_analysis.go 911 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package fix
  2. import (
  3. "eta/eta_index_lib/controllers"
  4. "eta/eta_index_lib/models"
  5. "eta/eta_index_lib/services/fix"
  6. )
  7. // CustomAnalysisController 自定义分析
  8. type CustomAnalysisController struct {
  9. controllers.BaseAuthController
  10. }
  11. var fixTable = false
  12. // FixTableV1
  13. // @Title 指标详情接口
  14. // @Description 指标详情接口
  15. // @Success 200 {object} models.EdbInfoDetailReq
  16. // @router /v1 [post]
  17. func (this *CustomAnalysisController) FixTableV1() {
  18. br := new(models.BaseResponse).Init()
  19. defer func() {
  20. this.Data["json"] = br
  21. this.ServeJSON()
  22. }()
  23. if fixTable {
  24. br.Ret = 200
  25. br.Success = true
  26. br.Msg = "请不要重复修复"
  27. return
  28. }
  29. fixTable = true
  30. //ETA1.0.2 自定义分析(生成指标数据修复)
  31. fix.FixTableData()
  32. //ETA1.0.2 自定义分析(修复excel与指标的关系)
  33. fix.FixTableDataMapping()
  34. br.Ret = 200
  35. br.Success = true
  36. br.Msg = "修复成功"
  37. }