|
@@ -335,6 +335,19 @@ func (this *ReportController) PdfDetail() {
|
|
|
} else {
|
|
|
reportPdf.IsPublic = IsPublic
|
|
|
}
|
|
|
+
|
|
|
+ count, err := models.GetMyReportCountByUserIdAndReportId(user.UserId, reportPdf.ReportPdfId, utils.ReportTypePdf)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取研报详情失败"
|
|
|
+ br.ErrMsg = "获取用户收藏记录失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if count > 0 {
|
|
|
+ reportPdf.IsCollect = true
|
|
|
+ } else {
|
|
|
+ reportPdf.IsCollect = false
|
|
|
+ }
|
|
|
+
|
|
|
resp.Report = reportPdf
|
|
|
resp.Status = utils.ReportPermissionStatusHas
|
|
|
|