浏览代码

fix:报告删除的提示信息调整

Roc 3 年之前
父节点
当前提交
0e05be4478
共有 2 个文件被更改,包括 4 次插入5 次删除
  1. 1 1
      controllers/report.go
  2. 3 4
      controllers/report_share.go

+ 1 - 1
controllers/report.go

@@ -56,7 +56,7 @@ func (this *ReportController) Detail() {
 	report, err := models.GetReportById(reportId)
 
 	if err != nil {
-		br.Msg = "获取报告详情失败"
+		br.Msg = "该报告已删除"
 		br.ErrMsg = "获取报告详情失败,Err:" + err.Error()
 		return
 	}

+ 3 - 4
controllers/report_share.go

@@ -10,7 +10,6 @@ type ReportShareController struct {
 	BaseCommonController
 }
 
-
 // @Title 日评详情
 // @Description 日评详情接口
 // @Param   ReportCode   query   string  true       "报告唯一编码"
@@ -23,15 +22,15 @@ func (this *ReportShareController) Detail() {
 		this.ServeJSON()
 	}()
 
-	reportCode:= this.GetString("ReportCode")
-	if reportCode =="" {
+	reportCode := this.GetString("ReportCode")
+	if reportCode == "" {
 		br.Msg = "参数错误"
 		br.ErrMsg = "参数错误,reportCode 为空"
 		return
 	}
 	report, err := models.GetReportByCode(reportCode)
 	if err != nil {
-		br.Msg = "获取报告详情失败"
+		br.Msg = "该报告已删除"
 		br.ErrMsg = "获取报告详情失败,Err:" + err.Error()
 		return
 	}