english_report.go 698 B

123456789101112131415161718192021222324252627282930313233
  1. package controllers
  2. import (
  3. "hongze/hongze_open_api/services"
  4. "hongze/hongze_open_api/utils"
  5. )
  6. type EnglishReportController struct {
  7. BaseCommon
  8. }
  9. // PublishNotify
  10. // @Title 策略报告发布通知
  11. // @Description 策略报告发布通知
  12. // @router /notify [get]
  13. func (c *EnglishReportController) PublishNotify() {
  14. // 解析出url上的参数值如下:
  15. id, err := c.GetInt("id")
  16. utils.ApiLog.Println("PublishNotify: id = ", id)
  17. if err != nil {
  18. c.FailWithMessageErr("id 格式错误", err.Error())
  19. return
  20. }
  21. if id == 0 {
  22. //go services.PullEnglishPolicyReportAll()
  23. c.FailWithMessage("请输入id")
  24. return
  25. }
  26. go services.PullEnglishPolicyReportSingle(id)
  27. c.Ok()
  28. return
  29. }