|
@@ -334,15 +334,17 @@ func (this *ReportController) PdfDetail() {
|
|
|
}
|
|
|
|
|
|
reportPdf, err := models.GetReportPdfById(reportPdfId)
|
|
|
- if err != nil {
|
|
|
- if err.Error() == utils.ErrNoRow() {
|
|
|
- br.Msg = "研报不存在或已删除"
|
|
|
- return
|
|
|
- }
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "研报不存在或已删除"
|
|
|
br.ErrMsg = "研报不存在或已删除,系统异常,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ if err.Error() == utils.ErrNoRow() {
|
|
|
+ // 尝试删除收藏列表的记录
|
|
|
+ models.DeleteMyReportByUserIdAndReportId(user.UserId, reportPdfId, utils.ReportTypePdf)
|
|
|
+ br.Msg = "研报不存在或已删除"
|
|
|
+ return
|
|
|
+ }
|
|
|
reportClassifyId := services.GetReportPdfClassify(reportPdf)
|
|
|
|
|
|
permissionResp, err := services.GetChartPermissionListByClassifyId(reportClassifyId, 0)
|