|
@@ -170,6 +170,7 @@ func (this *MobileSearchController) ListHomeArtAndChart() {
|
|
|
resp.ChartList = chartList
|
|
|
var result []*models.SearchItem
|
|
|
var total int64
|
|
|
+ var articleIds []int
|
|
|
if listType == 1 || listType == 2 {
|
|
|
//if orderColumn == "PublishDate" {
|
|
|
// tmpResult, tmpTotal, tmpErr := services.EsMultiMatchFunctionScoreQueryTimeSort(indexName, keyWord, startSize, 100, user.UserId)
|
|
@@ -246,8 +247,10 @@ func (this *MobileSearchController) ListHomeArtAndChart() {
|
|
|
result[k].ImgUrlPc = mapCategoryUrl[v.CategoryId]
|
|
|
}
|
|
|
result[k].Source = 1
|
|
|
+ articleIds = append(articleIds, v.ArticleId)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
//ListType query int true "列表类型,1最新/全部,2 纪要 ,3图表 默认1"
|
|
|
//记录用户搜索关键词
|
|
|
//var source int
|
|
@@ -270,6 +273,11 @@ func (this *MobileSearchController) ListHomeArtAndChart() {
|
|
|
}
|
|
|
if len(result) == 0 {
|
|
|
result = make([]*models.SearchItem, 0)
|
|
|
+ } else {
|
|
|
+ yxArticleIdMap := services.GetYxArticleIdMap(articleIds)
|
|
|
+ for _, v := range result {
|
|
|
+ v.IsResearch = yxArticleIdMap[v.ArticleId] // 添加是否属于研选的标识
|
|
|
+ }
|
|
|
}
|
|
|
page := paging.GetPaging(currentIndex, pageSize, int(total))
|
|
|
resp.Paging = page
|