|
@@ -637,6 +637,11 @@ func GetArticleListByApi(cont context.Context) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+//func init() {
|
|
|
+//
|
|
|
+// HandleArticleListByApi(7214)
|
|
|
+//}
|
|
|
+
|
|
|
//处理同步过来的文章
|
|
|
func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
defer func() {
|
|
@@ -718,8 +723,9 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
item.CreateDate = articleResult.CreateDate
|
|
|
item.PublishDate = articleResult.PublishDate.Add(time.Hour * 8)
|
|
|
item.PublishStatus = 1
|
|
|
- item.Body = articleResult.Content.Body
|
|
|
+ item.Body = articleResult.Corpus.Corpus
|
|
|
item.Abstract = articleResult.Content.Abstract
|
|
|
+ item.Annotation = articleResult.Content.Annotation
|
|
|
item.CategoryName = articleResult.Industry.Name
|
|
|
item.CategoryId = exitMap[articleResult.SeriesId]
|
|
|
item.SubCategoryName = articleResult.Series.Name
|
|
@@ -885,6 +891,7 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
updateParams["FileLink"] = v.File
|
|
|
updateParams["Stock"] = v.Stock
|
|
|
updateParams["FieldName"] = v.FieldName
|
|
|
+ updateParams["Annotation"] = v.Annotation
|
|
|
whereParam := map[string]interface{}{"article_id": v.ArticleId}
|
|
|
err = models.UpdateByExpr(models.CygxArticle{}, whereParam, updateParams)
|
|
|
if err != nil {
|
|
@@ -923,6 +930,7 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
item.MatchTypeName = matchTypeName
|
|
|
item.Stock = v.Stock
|
|
|
item.FieldName = v.FieldName
|
|
|
+ item.Annotation = v.Annotation
|
|
|
newId, err := models.AddCygxArticles(item)
|
|
|
if err != nil {
|
|
|
fmt.Println("AddCygxArticle Err:", err.Error())
|