|
@@ -330,6 +330,7 @@ func (this *MobileResearchController) HotList() {
|
|
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]
|
|
|
|
+ list[k].PublishDate = utils.StrTimeToTime(v.PublishDate).Format(utils.FormatDate) //时间字符串格式转时间格式
|
|
if v.FllowNum > 0 {
|
|
if v.FllowNum > 0 {
|
|
list[k].IsFollow = true
|
|
list[k].IsFollow = true
|
|
}
|
|
}
|
|
@@ -529,7 +530,7 @@ func (this *MobileResearchController) DepartmentIdDetail() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
resp := new(models.DepartmentDetailResp)
|
|
resp := new(models.DepartmentDetailResp)
|
|
- detail, err := models.GetDepartmentDetail(user.UserId, departmentId)
|
|
|
|
|
|
+ detail, err := models.GetDepartmentDetail(user.UserId, departmentId, condition)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取信息失败"
|
|
br.Msg = "获取信息失败"
|
|
br.ErrMsg = "获取作者信息失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取作者信息失败,Err:" + err.Error()
|
|
@@ -545,7 +546,7 @@ func (this *MobileResearchController) DepartmentIdDetail() {
|
|
resp.IsFollow = true
|
|
resp.IsFollow = true
|
|
}
|
|
}
|
|
|
|
|
|
- condition = ` AND a.department_id = ` + strconv.Itoa(departmentId)
|
|
|
|
|
|
+ condition += ` AND a.department_id = ` + strconv.Itoa(departmentId)
|
|
total, err := models.GetArticleResearchCount(condition, pars)
|
|
total, err := models.GetArticleResearchCount(condition, pars)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取信息失败"
|
|
br.Msg = "获取信息失败"
|
|
@@ -740,7 +741,6 @@ func (this *MobileResearchController) Billboard() {
|
|
br.ErrMsg = "研选分类ID不能为空"
|
|
br.ErrMsg = "研选分类ID不能为空"
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- condition += ` AND a.article_type_id IN (` + articleTypeIds + `) `
|
|
|
|
// 根据关注时间一个月前至昨日的增量数据排序
|
|
// 根据关注时间一个月前至昨日的增量数据排序
|
|
nowTime := time.Now().Local()
|
|
nowTime := time.Now().Local()
|
|
startTime := nowTime.AddDate(0, -1, 0)
|
|
startTime := nowTime.AddDate(0, -1, 0)
|
|
@@ -753,6 +753,7 @@ func (this *MobileResearchController) Billboard() {
|
|
br.ErrMsg = "获取报告阅读增量排行榜失败, Err:" + err.Error()
|
|
br.ErrMsg = "获取报告阅读增量排行榜失败, Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
list, err = services.HandleArticleCategoryImg(list, user)
|
|
list, err = services.HandleArticleCategoryImg(list, user)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取信息失败"
|
|
br.Msg = "获取信息失败"
|