|
@@ -672,7 +672,7 @@ func GetArticleListByApi(cont context.Context) (err error) {
|
|
|
}
|
|
|
|
|
|
//func init() {
|
|
|
-// HandleArticleListByApi(7370)
|
|
|
+// HandleArticleListByApi(7507)
|
|
|
//}
|
|
|
|
|
|
//处理同步过来的文章
|
|
@@ -822,6 +822,10 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
fmt.Println("GetTacticsList Err:", errMatch.Error())
|
|
|
return err
|
|
|
}
|
|
|
+ mapCategoryIdSet := make(map[int]int)
|
|
|
+ for _, vMatch := range listGetMatchTypeName {
|
|
|
+ mapCategoryIdSet[vMatch.CategoryId] = vMatch.CategoryIdSet
|
|
|
+ }
|
|
|
fmt.Println("list len:", len(list))
|
|
|
noSummaryArticleIds := "3454,3456,3457,3459,2449,2450,2453,2454,2459,2530,2583,2663,2670,2699,2715,2732,2748,2759,2399,2356,2870,3173,2978,2826,3470" //非纪要库类型的文章ID
|
|
|
listNoSummaryArticleIds := strings.Split(noSummaryArticleIds, ",")
|
|
@@ -913,7 +917,7 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
}
|
|
|
}
|
|
|
if isCustom == false {
|
|
|
- updateParams["CategoryId"] = v.CategoryId
|
|
|
+ updateParams["CategoryId"] = mapCategoryIdSet[v.CategoryId]
|
|
|
updateParams["MatchTypeName"] = matchTypeName
|
|
|
updateParams["IsSummary"] = v.IsSummary
|
|
|
updateParams["IsReport"] = v.IsReport
|
|
@@ -954,7 +958,7 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
item.Abstract = html.EscapeString(v.Abstract)
|
|
|
item.CategoryName = v.CategoryName
|
|
|
item.SubCategoryName = v.SubCategoryName
|
|
|
- item.CategoryId = v.CategoryId
|
|
|
+ item.CategoryId = mapCategoryIdSet[v.CategoryId]
|
|
|
item.CategoryIdTwo = v.CategoryId
|
|
|
item.PublishStatus = 1
|
|
|
item.ExpertBackground = expertContentStr
|
|
@@ -1020,6 +1024,9 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
mapIndustrialId[vIndustrial.IndustrialManagementId] = vIndustrial.IndustrialManagementId
|
|
|
industrialSubjectIdStr += strconv.Itoa(vIndustrial.IndustrialSubjectId) + ","
|
|
|
mapManagementForSubject[vIndustrial.IndustryName] += vIndustrial.SubjectName + "/"
|
|
|
+ if vIndustrial.LayoutTime == "0000-00-00 00:00:00" {
|
|
|
+ go models.UpdateIndustrialManagementLayoutTime(v.PublishDate.Format(utils.FormatDateTime), vIndustrial.IndustrialManagementId)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
industrialManagementIdStr = strings.TrimRight(industrialManagementIdStr, ",")
|