|
@@ -500,6 +500,7 @@ func GetFiccRreportToCygxArticle(cont context.Context) (err error) {
|
|
|
if v.ClassifyNameFirst == "晨会纪要" && v.ClassifyNameSecond == "晨会纪要" {
|
|
|
item.Title = "FICC/周期品晨会纪要"
|
|
|
}
|
|
|
+ item.CategoryName = "周期"
|
|
|
item.Body = v.Content
|
|
|
item.Abstract = v.Abstract
|
|
|
item.FieldName = v.ClassifyNameSecond
|
|
@@ -567,6 +568,7 @@ func GetFiccRreportToCygxArticle(cont context.Context) (err error) {
|
|
|
UpdateFICCReportResourceData(v.Id, listFiccSet)
|
|
|
|
|
|
AddCygxReportMappingCategoryGroupByArticleId(articleIdMax)
|
|
|
+ UpdateCygxZhouqiArticleMapTime(item.FieldName) //更新周期对应分类下所管理文章的更新时间
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -688,7 +690,11 @@ func GetFiccReportXcxItem(user *models.WxUserItem) (itemSourceResp *models.CygxR
|
|
|
}
|
|
|
|
|
|
//func init() {
|
|
|
-// UpdateCygxZhouqiArticleMapTime("煤炭")
|
|
|
+// strslice := []string{"晨会纪要", "煤炭", "铜行业数据点评", "石油石化", "黑色调研", "宏观G2观察", "黄金月报"}
|
|
|
+// for _, v := range strslice {
|
|
|
+// fmt.Println(v)
|
|
|
+// UpdateCygxZhouqiArticleMapTime(v)
|
|
|
+// }
|
|
|
//}
|
|
|
|
|
|
// UpdateCygxZhouqiArticleMapTime 更新周期对应分类下所管理文章的更新时间
|
|
@@ -707,7 +713,7 @@ func UpdateCygxZhouqiArticleMapTime(fieldName string) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- listCategory, err := models.GetCygxZhouqiArticleMapByParentId(detail.ParentId)
|
|
|
+ listCategory, e := models.GetCygxZhouqiArticleMapByParentId(detail.ParentId)
|
|
|
if e != nil {
|
|
|
err = errors.New("GetCygxZhouqiArticleMapByParentId, Err: " + err.Error())
|
|
|
return
|
|
@@ -719,14 +725,14 @@ func UpdateCygxZhouqiArticleMapTime(fieldName string) {
|
|
|
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
|
- condition = " AND field_name IN ('" + strings.Join(matchTypeName, "','") + "') ORDER BY publish_date DESC "
|
|
|
-
|
|
|
+ condition = " AND category_name = '周期' AND field_name IN ('" + strings.Join(matchTypeName, "','") + "') ORDER BY publish_date DESC "
|
|
|
articleList, e := models.GetCygxCygxArticleList(condition, pars, 0, 1)
|
|
|
if e != nil {
|
|
|
err = errors.New("GetCygxCygxArticleList, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ //就一条数据
|
|
|
for _, v := range articleList {
|
|
|
e = models.UpdateCygxZhouqiArticleMapTime(v.PublishDate, detail.ParentId)
|
|
|
}
|