|
@@ -204,14 +204,14 @@ func (this *ResearchController) 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]
|
|
@@ -293,18 +293,18 @@ func (this *ResearchController) KolList() {
|
|
|
conditionOrder = `ORDER BY sum_num DESC `
|
|
|
}
|
|
|
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
|
|
|
}
|
|
|
+ //}
|
|
|
|
|
|
list, err := models.GetDepartmentList(condition, conditionOrder, user.UserId, startSize, pageSize)
|
|
|
if err != nil {
|
|
@@ -331,9 +331,9 @@ func (this *ResearchController) KolList() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if themeType == 2 {
|
|
|
- v.IsHot = mapHot[v.DepartmentId]
|
|
|
- }
|
|
|
+ //if themeType == 2 {
|
|
|
+ v.IsHot = mapHot[v.DepartmentId]
|
|
|
+ //}
|
|
|
}
|
|
|
resp := new(models.DepartmentListResp)
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|
|
@@ -679,6 +679,7 @@ func (this *ResearchController) ArticleNewList() {
|
|
|
br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ articleTypeIds = ""
|
|
|
for _, v := range listType {
|
|
|
articleTypeIds += strconv.Itoa(v.ArticleTypeId) + ","
|
|
|
}
|