|
@@ -1744,7 +1744,7 @@ func (this *ReportController) Detail() {
|
|
|
// @Description 获取本周研究汇总详情接口
|
|
|
// @Param ArticleId query int true "报告ID"
|
|
|
// @Success 200 {object} models.ResearchSummaryLetailResp
|
|
|
-// @router /researchSummary/detail_test_del [get]
|
|
|
+// @router /researchSummary/detail [get]
|
|
|
func (this *ReportController) ResearchDetail() {
|
|
|
br := new(models.BaseResponse).Init()
|
|
|
defer func() {
|
|
@@ -1771,20 +1771,25 @@ func (this *ReportController) ResearchDetail() {
|
|
|
br.Msg = "获取信息失败"
|
|
|
br.ErrMsg = "获取用户权限信息失败,Err:" + err.Error()
|
|
|
}
|
|
|
+ detail, err := models.GetCygxResearchSummaryInfoById(articleId)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "报告不存在,Err:" + err.Error() + "articleId:" + strconv.Itoa(articleId)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ //未设置全部可见的只能给弘则内部查看
|
|
|
+ if detail.VisibleRange == 1 || user.CompanyId == utils.HZ_COMPANY_ID {
|
|
|
+ resp.IsShow = true
|
|
|
+ }
|
|
|
resp.HasPermission = hasPermission
|
|
|
- if hasPermission != 1 {
|
|
|
+ if hasPermission != 1 || !resp.IsShow {
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "获取成功"
|
|
|
br.Data = resp
|
|
|
return
|
|
|
}
|
|
|
- detail, err := models.GetCygxResearchSummaryInfoById(articleId)
|
|
|
- if err != nil {
|
|
|
- br.Msg = "获取信息失败"
|
|
|
- br.ErrMsg = "报告不存在,Err:" + err.Error() + "articleId:" + strconv.Itoa(articleId)
|
|
|
- return
|
|
|
- }
|
|
|
detail.PublishDate = utils.StrTimeToTime(detail.PublishDate).Format(utils.FormatDate)
|
|
|
detail.VideoPlaySeconds = utils.Mp3Time(detail.VideoPlaySeconds)
|
|
|
listFirst, err := models.GetResearchSummarylogListFirst(articleId)
|