From 5bed9161cd8a3a9304daeddb9dac899100e3de5e Mon Sep 17 00:00:00 2001 From: hupeng Date: Wed, 5 May 2021 09:47:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E8=AF=A6=E6=83=85=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/admin/DictDetailController.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/admin/DictDetailController.go b/controllers/admin/DictDetailController.go index 2942ee4..c13e879 100644 --- a/controllers/admin/DictDetailController.go +++ b/controllers/admin/DictDetailController.go @@ -28,8 +28,8 @@ func (c *DictDetailController) URLMapping() { func (c *DictDetailController) GetAll() { dictId, _ := c.GetInt64("dictId") dictName := c.GetString("dictName") - total,list := models.GetAllDictDetail(c.GetParams(),dictId,dictName) - c.Data["json"] = controllers.SuccessData(vo.ResultList{Content: list,TotalElements: total}) + total, list := models.GetAllDictDetail(c.GetParams(), dictId, dictName) + c.Data["json"] = controllers.SuccessData(vo.ResultList{Content: list, TotalElements: total}) c.ServeJSON() } @@ -37,7 +37,7 @@ func (c *DictDetailController) GetAll() { // @Description 添加字典详情 // @Success 200 {object} controllers.Result // @router / [post] -func (c *DictDetailController) Post() { +func (c *DictDetailController) Post() { var model models.SysDictDetail valid := validation.Validation{} json.Unmarshal(c.Ctx.Input.RequestBody, &model) @@ -60,7 +60,7 @@ func (c *DictDetailController) Post() { // @Description 修改字典详情 // @Success 200 {object} controllers.Result // @router / [put] -func (c *DictDetailController) Put() { +func (c *DictDetailController) Put() { var model models.SysDictDetail valid := validation.Validation{} json.Unmarshal(c.Ctx.Input.RequestBody, &model) @@ -83,7 +83,7 @@ func (c *DictDetailController) Put() { // @Success 200 {object} controllers.Result // @router /:id [delete] func (c *DictDetailController) Delete() { - id, _ := c.GetInt64(":id",1) + id, _ := c.GetInt64(":id", 1) e := models.DelByDictDetail(id) if e != nil { c.Data["json"] = controllers.ErrMsg(e.Error())