Browse Source

no message

xingzai 2 years ago
parent
commit
024e998f19
2 changed files with 24 additions and 19 deletions
  1. 23 18
      controllers/research.go
  2. 1 1
      services/article.go

+ 23 - 18
controllers/research.go

@@ -227,18 +227,18 @@ func (this *MobileResearchController) KolList() {
 		return
 	}
 	mapHot := make(map[int]bool)
-	if themeType == 2 {
-		conditionHot := `ORDER BY sum_num DESC `
-		listhot, err := models.GetDepartmentList(condition, conditionHot, user.UserId, 0, 3)
-		if err != nil {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "获取信息失败,Err:" + err.Error()
-			return
-		}
-		for _, v := range listhot {
-			mapHot[v.DepartmentId] = true
-		}
+	//if themeType == 2 {
+	conditionHot := `ORDER BY sum_num DESC `
+	listhot, err := models.GetDepartmentList(condition, conditionHot, user.UserId, 0, 3)
+	if err != nil {
+		br.Msg = "获取信息失败"
+		br.ErrMsg = "获取信息失败,Err:" + err.Error()
+		return
 	}
+	for _, v := range listhot {
+		mapHot[v.DepartmentId] = true
+	}
+	//}
 
 	departmentMap := make(map[string]string)
 	for k, v := range list {
@@ -341,14 +341,14 @@ func (this *MobileResearchController) HotList() {
 		br.ErrMsg = "GetYanXuanIndustrialManagementIdNewMap,Err:" + err.Error()
 		return
 	}
-	if themeType == 2 {
-		mapHot, err = services.GetYanXuanIndustrialManagementIdHotMap(articleTypeIds)
-		if err != nil {
-			br.Msg = "获取信息失败"
-			br.ErrMsg = "GetYanXuanIndustrialManagementIdNewMap,Err:" + err.Error()
-			return
-		}
+	//if themeType == 2 {
+	mapHot, err = services.GetYanXuanIndustrialManagementIdHotMap(articleTypeIds)
+	if err != nil {
+		br.Msg = "获取信息失败"
+		br.ErrMsg = "GetYanXuanIndustrialManagementIdNewMap,Err:" + err.Error()
+		return
 	}
+	//}
 	for k, v := range list {
 		list[k].IsNew = mapNew[v.IndustrialManagementId]
 		list[k].IsHot = mapHot[v.IndustrialManagementId]
@@ -619,6 +619,11 @@ func (this *MobileResearchController) DepartmentIdDetail() {
 			ButtonStyle:     styleMap[v.ArticleTypeId],
 			List:            v.List,
 		}
+		if item.ArticleTypeName == "纪要" || item.ArticleTypeName == "沙龙" || item.ArticleTypeName == "专家访谈" {
+			item.Annotation = "核心结论:" + item.Annotation
+		} else {
+			item.Annotation = "核心观点:" + item.Annotation
+		}
 		resp.List = append(resp.List, &item)
 	}
 

+ 1 - 1
services/article.go

@@ -135,7 +135,7 @@ func HandleArticleCategoryImg(list []*models.ArticleListResp, user *models.WxUse
 
 		list[k].ChartPermissionName = mapChartPerssion[v.CategoryId]
 		//如果是研选系列的任意取五张图片的中的一张
-		if v.CategoryId == "0" || v.ArticleId > utils.SummaryArticleId {
+		if v.CategoryId == "0" || v.ArticleId >= utils.SummaryArticleId {
 			knum := v.ArticleId % 5
 			list[k].ImgUrlPc = researchList[knum]
 		} else {