zhangchuanxing hai 3 meses
pai
achega
577182b293
Modificáronse 2 ficheiros con 16 adicións e 14 borrados
  1. 11 9
      services/ficc_report.go
  2. 5 5
      services/task.go

+ 11 - 9
services/ficc_report.go

@@ -2,7 +2,6 @@ package services
 
 //FICC研报
 import (
-	"context"
 	"encoding/json"
 	"errors"
 	"fmt"
@@ -431,14 +430,14 @@ func GetChapterListByReportChapterIdList(classifyNameFirst string, reportId int,
 	return
 }
 
-//func init() {
-//	GetFiccRreportToCygxArticle()
-//	//UpdateFICCReportResourceData(5542)
-//}
+func init() {
+	GetFiccRreportToCygxArticle()
+	//UpdateFICCReportResourceData(5542)
+}
 
 // 获取FICC研报到查研观向数据库中
-func GetFiccRreportToCygxArticle(cont context.Context) (err error) {
-	//func GetFiccRreportToCygxArticle() (err error) {
+// func GetFiccRreportToCygxArticle(cont context.Context) (err error) {
+func GetFiccRreportToCygxArticle() (err error) {
 	defer func() {
 		if err != nil {
 			fmt.Println(err)
@@ -448,7 +447,7 @@ func GetFiccRreportToCygxArticle(cont context.Context) (err error) {
 	var condition string
 	var pars []interface{}
 	modifyTime := time.Now().Add(-10 * time.Minute)
-	condition = `  AND modify_time >= ?   `
+	condition = `  AND modify_time >= ?  OR  id =   11897  `
 	pars = append(pars, modifyTime)
 	reportList, e := ficc_report.GetFiccRreportToCygxArticle(condition, pars)
 	if e != nil {
@@ -503,7 +502,7 @@ func GetFiccRreportToCygxArticle(cont context.Context) (err error) {
 			item.CategoryName = utils.ZHOU_QI_NAME
 			item.Body = v.Content
 			item.Abstract = v.Abstract
-			item.FieldName = v.ClassifyNameSecond
+			item.FieldName = "PVC烧碱双周报"
 			item.CreateDate = time.Now().Format(utils.FormatDate)
 			item.PublishStatus = 1
 			item.IsReport = 1
@@ -521,6 +520,9 @@ func GetFiccRreportToCygxArticle(cont context.Context) (err error) {
 					continue
 				}
 			}
+			haveSet = true
+			item.SubCategoryName = "PVC烧碱双周报"
+			item.MatchTypeName = "PVC烧碱双周报"
 			if !haveSet {
 				continue
 			}

+ 5 - 5
services/task.go

@@ -167,8 +167,8 @@ func Task() {
 		getYanxuanSpecialLikeCountDifferent := task.NewTask("getYanxuanSpecialLikeCountDifferent", "0 0 */1 * * *", GetYanxuanSpecialLikeCountDifferent)
 		task.AddTask("定时任务处理退款回调", getYanxuanSpecialLikeCountDifferent) // 专栏文章获得点赞时,模板消息通知作者(每个整点发送,不同文章分多条发送)
 
-		getFiccRreportToCygxArticle := task.NewTask("getFiccRreportToCygxArticle", "0 */10 * * * *", GetFiccRreportToCygxArticle)
-		task.AddTask("获取FICC研报到查研观向数据库中", getFiccRreportToCygxArticle) //获取FICC研报到查研观向数据库中
+		//getFiccRreportToCygxArticle := task.NewTask("getFiccRreportToCygxArticle", "0 */10 * * * *", GetFiccRreportToCygxArticle)
+		//task.AddTask("获取FICC研报到查研观向数据库中", getFiccRreportToCygxArticle) //获取FICC研报到查研观向数据库中
 	}
 
 	//UpdateRaiServeBillDate()
@@ -178,9 +178,9 @@ func Task() {
 	//	task.AddTask("getArticleListByApi", getArticleListByApi)
 	//}
 
-	go UserLabelLogReduce()              // 处理用户标签的队列消息
-	go YanXuanActivityPointsBillReduce() // 处理研选活动扣点
-	go UpdateArticleByRedis()            // 处理策略平台同步过来的文章
+	//go UserLabelLogReduce()              // 处理用户标签的队列消息
+	//go YanXuanActivityPointsBillReduce() // 处理研选活动扣点
+	//go UpdateArticleByRedis()            // 处理策略平台同步过来的文章
 
 	//GetCygxActivityAttendanceDetail()
 	//CreateIndexNameArticleHistory()