Browse Source

标记自动归类失败的报告

xingzai 2 years ago
parent
commit
96543dd84e
2 changed files with 9 additions and 0 deletions
  1. 8 0
      models/article.go
  2. 1 0
      services/article.go

+ 8 - 0
models/article.go

@@ -644,3 +644,11 @@ func GetSubjectIds(articleId int) (subjects string, err error) {
 	err = o.Raw(sql, articleId).QueryRow(&subjects)
 	return
 }
+
+//修改发布状态
+func UpdateIsClassFail(articleId int) (err error) {
+	sql := `UPDATE cygx_article SET  is_class_fail=1  WHERE article_id=? `
+	o := orm.NewOrm()
+	_, err = o.Raw(sql, articleId).Exec()
+	return
+}

+ 1 - 0
services/article.go

@@ -994,6 +994,7 @@ func HandleArticleListByApi(artcleId int) (err error) {
 							keyword3 = v.Title
 							keyword4 = v.PublishDate.Format(utils.FormatDateTime)
 							SendWxMsgWithArticleClassToAdmin(keyword1, keyword2, keyword3, keyword4, openIdList, articleIdInt)
+							go models.UpdateIsClassFail(artcleId)
 						}
 					}
 				}