Browse Source

Merge branch 'BI_Dashboard' into dm

zwxi 6 months ago
parent
commit
6fb650b5ba
1 changed files with 12 additions and 1 deletions
  1. 12 1
      controllers/bi_dashboard.go

+ 12 - 1
controllers/bi_dashboard.go

@@ -1180,6 +1180,17 @@ func (this *BIDaShboardController) HomePageSave() {
 		this.ServeJSON()
 	}()
 	var req bi_dashboard.SaveHomePageReq
+	err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+
+	if req.BiDashboardId <= 0 {
+		br.Msg = "参数错误"
+		return
+	}
 
 	item := &bi_dashboard.BiDashboardHomePage{
 		BiDashboardId:         req.BiDashboardId,
@@ -1187,7 +1198,7 @@ func (this *BIDaShboardController) HomePageSave() {
 		CreateTime:            time.Now(),
 		ModifyTime:            time.Now(),
 	}
-	err := bi_dashboard.SaveBiDashboardHomePage(item)
+	err = bi_dashboard.SaveBiDashboardHomePage(item)
 	if err != nil {
 		br.Msg = "保存失败"
 		br.ErrMsg = "保存失败,Err:" + err.Error()