|
@@ -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
|
|
|
}
|