|
@@ -2,6 +2,7 @@ package controllers
|
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
+ "fmt"
|
|
|
"github.com/rdlucklib/rdluck_tools/common"
|
|
|
"hongze/hongze_open_api/logic"
|
|
|
"hongze/hongze_open_api/models/request/article"
|
|
@@ -10,6 +11,7 @@ import (
|
|
|
"hongze/hongze_open_api/models/tables/rddp/classify"
|
|
|
tables "hongze/hongze_open_api/models/tables/report"
|
|
|
"hongze/hongze_open_api/models/tables/wx_user"
|
|
|
+ "hongze/hongze_open_api/services/alarm_msg"
|
|
|
"hongze/hongze_open_api/utils"
|
|
|
"net/url"
|
|
|
"strconv"
|
|
@@ -303,9 +305,31 @@ func (c *ReportController) ArticleChange() {
|
|
|
c.OkWithMessage("创建失败")
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ if action == "edit" || action == "move" {
|
|
|
+ log := &celuePushTable.CygxArticleCeluePushRedis{ArticleId: articleId, Action: action, CreateTime: time.Now()}
|
|
|
+ if utils.Re == nil {
|
|
|
+ err := utils.Rc.LPush(utils.CYGX_ARTICLE_UPDATE_KEY, log)
|
|
|
+ if err != nil {
|
|
|
+ go alarm_msg.SendAlarmMsg(fmt.Sprint("CygxArticleCeluePushRedis LPush Err:", err.Error(), "文章ID", articleId), 3)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
c.OkWithMessage("创建成功")
|
|
|
}
|
|
|
|
|
|
+//func init() {
|
|
|
+// articleId := 10187
|
|
|
+// action := "edit"
|
|
|
+// log := &celuePushTable.CygxArticleCeluePushRedis{ArticleId: articleId, Action: action, CreateTime: time.Now()}
|
|
|
+// if utils.Re == nil {
|
|
|
+// err := utils.Rc.LPush(utils.CYGX_ARTICLE_UPDATE_KEY, log)
|
|
|
+// if err != nil {
|
|
|
+// go alarm_msg.SendAlarmMsg(fmt.Sprint("CygxArticleCeluePushRedis LPush Err:", err.Error(), "文章ID", articleId), 3)
|
|
|
+// }
|
|
|
+// }
|
|
|
+//}
|
|
|
+
|
|
|
// ClassifyList
|
|
|
// @Title 获取报告分类列表接口
|
|
|
// @Description 获取报告分类列表接口
|