|
@@ -435,6 +435,9 @@ func (this *ReportController) List() {
|
|
if v.Readnum == 0 && user.CreatedTime.Before(utils.StrTimeToTime(v.PublishDate)) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(v.PublishDate)) {
|
|
if v.Readnum == 0 && user.CreatedTime.Before(utils.StrTimeToTime(v.PublishDate)) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(v.PublishDate)) {
|
|
list[k].IsRed = true
|
|
list[k].IsRed = true
|
|
}
|
|
}
|
|
|
|
+ if v.VideoUrl != "" {
|
|
|
|
+ list[k].IsHaveVideo = true
|
|
|
|
+ }
|
|
}
|
|
}
|
|
resp.List = list
|
|
resp.List = list
|
|
resp.Paging = page
|
|
resp.Paging = page
|
|
@@ -1248,6 +1251,20 @@ func (this *ReportController) Detail() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
resp := new(models.ReportSelectionLetailResp)
|
|
resp := new(models.ReportSelectionLetailResp)
|
|
|
|
+ //判断用户权限
|
|
|
|
+ hasPermission, err := services.GetUserhasPermission(user)
|
|
|
|
+ if err != nil {
|
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
|
+ br.ErrMsg = "获取用户权限信息失败,Err:" + err.Error()
|
|
|
|
+ }
|
|
|
|
+ resp.HasPermission = hasPermission
|
|
|
|
+ if hasPermission != 1 {
|
|
|
|
+ br.Ret = 200
|
|
|
|
+ br.Success = true
|
|
|
|
+ br.Msg = "获取成功"
|
|
|
|
+ br.Data = resp
|
|
|
|
+ return
|
|
|
|
+ }
|
|
detail, err := models.GetCygxReportSelectionInfoById(articleId)
|
|
detail, err := models.GetCygxReportSelectionInfoById(articleId)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取信息失败"
|
|
br.Msg = "获取信息失败"
|
|
@@ -1269,6 +1286,7 @@ func (this *ReportController) Detail() {
|
|
item := new(models.ReportSelectionChartPermission)
|
|
item := new(models.ReportSelectionChartPermission)
|
|
if existMap[v.ChartPermissionId] == 0 {
|
|
if existMap[v.ChartPermissionId] == 0 {
|
|
item.PermissionName = v.PermissionName + "领域深度调研和报告"
|
|
item.PermissionName = v.PermissionName + "领域深度调研和报告"
|
|
|
|
+ item.IcoLink = v.IcoLink
|
|
listSonLog, err := models.GetReportSelectionlogSonListAll(articleId, v.ChartPermissionId)
|
|
listSonLog, err := models.GetReportSelectionlogSonListAll(articleId, v.ChartPermissionId)
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
br.Msg = "获取信息失败"
|
|
br.Msg = "获取信息失败"
|
|
@@ -1335,6 +1353,20 @@ func (this *ReportController) ResearchDetail() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
resp := new(models.ResearchSummaryLetailResp)
|
|
resp := new(models.ResearchSummaryLetailResp)
|
|
|
|
+ //判断用户权限
|
|
|
|
+ hasPermission, err := services.GetUserhasPermission(user)
|
|
|
|
+ if err != nil {
|
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
|
+ br.ErrMsg = "获取用户权限信息失败,Err:" + err.Error()
|
|
|
|
+ }
|
|
|
|
+ resp.HasPermission = hasPermission
|
|
|
|
+ if hasPermission != 1 {
|
|
|
|
+ br.Ret = 200
|
|
|
|
+ br.Success = true
|
|
|
|
+ br.Msg = "获取成功"
|
|
|
|
+ br.Data = resp
|
|
|
|
+ return
|
|
|
|
+ }
|
|
detail, err := models.GetCygxResearchSummaryInfoById(articleId)
|
|
detail, err := models.GetCygxResearchSummaryInfoById(articleId)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取信息失败"
|
|
br.Msg = "获取信息失败"
|
|
@@ -1362,9 +1394,13 @@ func (this *ReportController) ResearchDetail() {
|
|
br.ErrMsg = "获取信息失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取信息失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- fmt.Println(listThird)
|
|
|
|
if len(listThird) > 0 {
|
|
if len(listThird) > 0 {
|
|
listSecond[k2].List = listThird
|
|
listSecond[k2].List = listThird
|
|
|
|
+ for k3, v3 := range listThird {
|
|
|
|
+ if v3.VideoUrl != "" {
|
|
|
|
+ listThird[k3].IsHaveVideo = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if len(listSecond) > 0 {
|
|
if len(listSecond) > 0 {
|
|
@@ -1373,12 +1409,16 @@ func (this *ReportController) ResearchDetail() {
|
|
//`description:"类型'SDBG深度报告片篇,’CYDYJY:产业调研纪要’,’SJDP事件点评,’BZCHJH:本周晨会精华’"`
|
|
//`description:"类型'SDBG深度报告片篇,’CYDYJY:产业调研纪要’,’SJDP事件点评,’BZCHJH:本周晨会精华’"`
|
|
if v.Type == "SDBG" {
|
|
if v.Type == "SDBG" {
|
|
listFirst[k].ListName = "深度报告"
|
|
listFirst[k].ListName = "深度报告"
|
|
|
|
+ listFirst[k].IcoLink = ""
|
|
} else if v.Type == "BZCHJH" {
|
|
} else if v.Type == "BZCHJH" {
|
|
listFirst[k].ListName = "本周晨会精华"
|
|
listFirst[k].ListName = "本周晨会精华"
|
|
|
|
+ listFirst[k].IcoLink = "https://hongze.oss-cn-shanghai.aliyuncs.com/static/images/202110/20211020/DCfekcxaIKGePBsNVu1ULfmNcJBY.png"
|
|
} else if v.Type == "CYDYJY" {
|
|
} else if v.Type == "CYDYJY" {
|
|
listFirst[k].ListName = "产业调研纪要"
|
|
listFirst[k].ListName = "产业调研纪要"
|
|
|
|
+ listFirst[k].IcoLink = "https://hongze.oss-cn-shanghai.aliyuncs.com/static/images/202110/20211020/UPAdozy96z9ypzY04vi0Y3Ogqzji.png"
|
|
} else {
|
|
} else {
|
|
listFirst[k].ListName = "事件点评"
|
|
listFirst[k].ListName = "事件点评"
|
|
|
|
+ listFirst[k].IcoLink = "https://hongze.oss-cn-shanghai.aliyuncs.com/static/images/202110/20211020/2a5cXafO3Iws4QcFp1bd5WPdYikV.png"
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -1425,6 +1465,20 @@ func (this *ReportController) MinutesDetail() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
resp := new(models.MinutesSummaryLetailResp)
|
|
resp := new(models.MinutesSummaryLetailResp)
|
|
|
|
+ //判断用户权限
|
|
|
|
+ hasPermission, err := services.GetUserhasPermission(user)
|
|
|
|
+ if err != nil {
|
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
|
+ br.ErrMsg = "获取用户权限信息失败,Err:" + err.Error()
|
|
|
|
+ }
|
|
|
|
+ resp.HasPermission = hasPermission
|
|
|
|
+ if hasPermission != 1 {
|
|
|
|
+ br.Ret = 200
|
|
|
|
+ br.Success = true
|
|
|
|
+ br.Msg = "获取成功"
|
|
|
|
+ br.Data = resp
|
|
|
|
+ return
|
|
|
|
+ }
|
|
detail, err := models.GetCygxMinutesSummaryInfoById(articleId)
|
|
detail, err := models.GetCygxMinutesSummaryInfoById(articleId)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取信息失败"
|
|
br.Msg = "获取信息失败"
|
|
@@ -1467,8 +1521,8 @@ func (this *ReportController) MinutesDetail() {
|
|
br.Data = resp
|
|
br.Data = resp
|
|
}
|
|
}
|
|
|
|
|
|
-// @Title 获取报告详情
|
|
|
|
-// @Description 获取报告详情接口
|
|
|
|
|
|
+// @Title 获取路演精华详情
|
|
|
|
+// @Description 获取路演精华详情接口
|
|
// @Param ArticleId query int true "报告ID"
|
|
// @Param ArticleId query int true "报告ID"
|
|
// @Success 200 {object} models.RoadshowDetailResp
|
|
// @Success 200 {object} models.RoadshowDetailResp
|
|
// @router /roadshowEssence/detail [get]
|
|
// @router /roadshowEssence/detail [get]
|