|
@@ -727,6 +727,7 @@ func (this *MobileReportController) SearchReport() {
|
|
|
}
|
|
|
startSize = paging.StartIndex(currentIndex, pageSize)
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|
|
|
+ resp := new(models.ReoprtSearchResp)
|
|
|
//匹配报告标题、
|
|
|
condition = ` AND ( a.title LIKE '%` + keyWord + `%' OR a.body LIKE '%` + keyWord + `%') AND a.publish_status = 1 `
|
|
|
|
|
@@ -778,13 +779,40 @@ func (this *MobileReportController) SearchReport() {
|
|
|
industrialMap[v.ArticleId] = append(industrialMap[v.ArticleId], item)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ detailCategoryUrl, err := models.GetConfigByCode("category_map_img_url")
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取数据失败"
|
|
|
+ br.ErrMsg = "行业配置信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ categoryUrlList := strings.Split(detailCategoryUrl.ConfigValue, "{|}")
|
|
|
+ mapCategoryUrl := make(map[string]string)
|
|
|
+ var categoryId string
|
|
|
+ var imgUrlChart string
|
|
|
+ for _, v := range categoryUrlList {
|
|
|
+ vslice := strings.Split(v, "_")
|
|
|
+ categoryId = vslice[0]
|
|
|
+ imgUrlChart = vslice[len(vslice)-1]
|
|
|
+ mapCategoryUrl[categoryId] = imgUrlChart
|
|
|
+ }
|
|
|
+
|
|
|
for k, v := range listHz {
|
|
|
if len(industrialMap[v.ArticleId]) > 0 {
|
|
|
listHz[k].List = industrialMap[v.ArticleId]
|
|
|
} else {
|
|
|
listHz[k].List = make([]*models.IndustrialManagementResp, 0)
|
|
|
}
|
|
|
+ listHz[k].Body = ""
|
|
|
+ listHz[k].Abstract, _ = services.GetReportContentTextSub(v.Abstract)
|
|
|
+ listHz[k].Annotation, _ = services.GetReportContentTextSub(v.Annotation)
|
|
|
+ //行业比较研究、资金流向,显示报告的摘要
|
|
|
+ if listHz[k].CategoryName == "行业比较研究" || listHz[k].CategoryName == "资金流向" {
|
|
|
+ listHz[k].Annotation = listHz[k].Abstract
|
|
|
+ }
|
|
|
+ listHz[k].ImgUrlPc = mapCategoryUrl[v.CategoryId]
|
|
|
}
|
|
|
+
|
|
|
if keyWord != "" {
|
|
|
go services.AddUserSearchLog(user, keyWord, 5)
|
|
|
}
|
|
@@ -793,7 +821,7 @@ func (this *MobileReportController) SearchReport() {
|
|
|
}
|
|
|
|
|
|
page = paging.GetPaging(currentIndex, pageSize, total)
|
|
|
- resp := new(models.ReoprtSearchResp)
|
|
|
+
|
|
|
resp.Paging = page
|
|
|
resp.ListHz = listHz
|
|
|
br.Ret = 200
|