|
@@ -219,11 +219,26 @@ func (this *MobileResearchController) KolList() {
|
|
br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
return
|
|
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
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
departmentMap := make(map[string]string)
|
|
departmentMap := make(map[string]string)
|
|
for k, v := range list {
|
|
for k, v := range list {
|
|
if v.FllowNum > 0 {
|
|
if v.FllowNum > 0 {
|
|
list[k].IsFollow = true
|
|
list[k].IsFollow = true
|
|
}
|
|
}
|
|
|
|
+ list[k].IsHot = mapHot[v.DepartmentId]
|
|
list[k].PublishDate = utils.StrTimeToTime(v.PublishDate).Format(utils.FormatDate) //时间字符串格式转时间格式
|
|
list[k].PublishDate = utils.StrTimeToTime(v.PublishDate).Format(utils.FormatDate) //时间字符串格式转时间格式
|
|
for _, v2 := range listIndustrial {
|
|
for _, v2 := range listIndustrial {
|
|
if v2.DepartmentId == v.DepartmentId {
|
|
if v2.DepartmentId == v.DepartmentId {
|
|
@@ -319,14 +334,14 @@ func (this *MobileResearchController) HotList() {
|
|
br.ErrMsg = "GetYanXuanIndustrialManagementIdNewMap,Err:" + err.Error()
|
|
br.ErrMsg = "GetYanXuanIndustrialManagementIdNewMap,Err:" + err.Error()
|
|
return
|
|
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 {
|
|
for k, v := range list {
|
|
list[k].IsNew = mapNew[v.IndustrialManagementId]
|
|
list[k].IsNew = mapNew[v.IndustrialManagementId]
|
|
list[k].IsHot = mapHot[v.IndustrialManagementId]
|
|
list[k].IsHot = mapHot[v.IndustrialManagementId]
|