1234567891011121314151617181920212223242526272829303132333435363738 |
- package controllers
- import (
- "hongze/hongze_open_api/services"
- "hongze/hongze_open_api/utils"
- )
- type EnglishReportController struct {
- BaseCommon
- }
- // PublishNotify
- // @Title 策略报告发布通知
- // @Description 策略报告发布通知
- // @router /notify [get]
- func (c *EnglishReportController) PublishNotify() {
- // 解析出url上的参数值如下:
- id, err := c.GetInt("id")
- utils.ApiLog.Println("PublishNotify: id = ", id)
- if err != nil {
- c.FailWithMessageErr("id 格式错误", err.Error())
- return
- }
- if id == 0 {
- //go services.PullEnglishPolicyReportAll()
- c.FailWithMessage("请输入id")
- return
- }
- if utils.RunMode == "debug" {
- go services.PullEnglishPolicyReportSingle(id)
- } else {
- //暂不上线,走测试环境
- services.TestDebugEnglishPolicyReport(id)
- }
- c.Ok()
- return
- }
|