|
@@ -999,7 +999,9 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
titleNew = v.Title + utils.WeekByDate(v.PublishDate)
|
|
|
}
|
|
|
}
|
|
|
- if v.CategoryId == 80 {
|
|
|
+
|
|
|
+ //策略周度思考,医药周报,消费周报,消费周度思考,科技前言(周报)、智造精粹、智造本周荟 标题处理
|
|
|
+ if v.CategoryId == 80 || v.CategoryId == 52 || v.CategoryId == 10074 || v.CategoryId == 1008 || v.CategoryId == 10071 || v.CategoryId == 10073 || v.CategoryId == 50 {
|
|
|
titleNew = v.Title + utils.WeekByDate(v.PublishDate)
|
|
|
}
|
|
|
|
|
@@ -3081,3 +3083,52 @@ func HandleArticleListByApiInit13_5GuShou(artcleId int) (err error) {
|
|
|
AddCygxReportMappingCategoryGroupByArticleId(artcleId)
|
|
|
return err
|
|
|
}
|
|
|
+
|
|
|
+// 需求池972 修改部分报告类型title
|
|
|
+func initweek() {
|
|
|
+ var category_id int
|
|
|
+ //category_id = 52
|
|
|
+ //category_id = 10074
|
|
|
+ //category_id = 1008
|
|
|
+ //category_id = 10071
|
|
|
+ //category_id = 10073
|
|
|
+ //category_id = 50
|
|
|
+ var condition string
|
|
|
+ var pars []interface{}
|
|
|
+ condition += ` AND category_id = ? AND publish_date > '2023-12-31' `
|
|
|
+ pars = append(pars, category_id)
|
|
|
+ articleList, e := models.GetCygxCygxArticleList(condition, pars, 0, 1000)
|
|
|
+ if e != nil {
|
|
|
+ fmt.Println(e)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var clueApiUrl string
|
|
|
+ for _, v := range articleList {
|
|
|
+
|
|
|
+ clueApiUrl = fmt.Sprint(utils.ApiUrl, "articles/", v.ArticleId)
|
|
|
+ fmt.Println(clueApiUrl)
|
|
|
+
|
|
|
+ authorization := utils.ApiAuthorization
|
|
|
+ body, err := PublicGetDate(clueApiUrl, authorization)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var articleResultDate models.ArticleDetailResultApi
|
|
|
+ err = json.Unmarshal(body, &articleResultDate)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ articleResult := articleResultDate.Data
|
|
|
+
|
|
|
+ titleWeek := articleResult.Title + utils.WeekByDate(articleResult.PublishDate)
|
|
|
+
|
|
|
+ fmt.Println(titleWeek)
|
|
|
+ e = models.ModifyArticleTitleByarticleId(v.ArticleId, titleWeek)
|
|
|
+ if e != nil {
|
|
|
+ fmt.Println(e)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|