浏览代码

Merge branch 'bugfix_9.18'

ziwen 1 年之前
父节点
当前提交
243ee31305
共有 2 个文件被更改,包括 8 次插入0 次删除
  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