Browse Source

Merge branch 'bugfix_9.18'

ziwen 1 year ago
parent
commit
243ee31305
2 changed files with 8 additions and 0 deletions
  1. 4 0
      controllers/english_report/report.go
  2. 4 0
      controllers/report.go

+ 4 - 0
controllers/english_report/report.go

@@ -265,6 +265,10 @@ func (this *EnglishReportController) Detail() {
 	}
 	item, err := models.GetEnglishReportById(reportId)
 	if err != nil {
+		if err.Error() == utils.ErrNoRow() {
+			br.Msg = "报告已被删除"
+			return
+		}
 		br.Msg = "获取失败"
 		br.ErrMsg = "获取失败,Err:" + err.Error()
 		return

+ 4 - 0
controllers/report.go

@@ -692,6 +692,10 @@ func (this *ReportController) Detail() {
 	}
 	item, err := models.GetReportById(reportId)
 	if err != nil {
+		if err.Error() == utils.ErrNoRow() {
+			br.Msg = "报告已被删除"
+			return
+		}
 		br.Msg = "获取失败"
 		br.ErrMsg = "获取失败,Err:" + err.Error()
 		return