diff --git a/apis/system/dept.go b/apis/system/dept.go index f12c595..60839be 100644 --- a/apis/system/dept.go +++ b/apis/system/dept.go @@ -61,7 +61,7 @@ func GetDept(c *gin.Context) { // @Tags 部门 // @Accept application/json // @Product application/json -// @Param data body models.Dept true "data" +// @Param data body models.SysDept true "data" // @Success 200 {string} string "{"code": 200, "message": "添加成功"}" // @Success 200 {string} string "{"code": -1, "message": "添加失败"}" // @Router /api/v1/dept [post] @@ -82,7 +82,7 @@ func InsertDept(c *gin.Context) { // @Accept application/json // @Product application/json // @Param id path int true "id" -// @Param data body models.Dept true "body" +// @Param data body models.SysDept true "body" // @Success 200 {string} string "{"code": 200, "message": "添加成功"}" // @Success 200 {string} string "{"code": -1, "message": "添加失败"}" // @Router /api/v1/dept [put] diff --git a/apis/system/post.go b/apis/system/post.go index 3f3c0a9..a793c6d 100644 --- a/apis/system/post.go +++ b/apis/system/post.go @@ -82,7 +82,7 @@ func InsertPost(c *gin.Context) { // @Tags 岗位 // @Accept application/json // @Product application/json -// @Param data body models.Dept true "body" +// @Param data body models.Post true "body" // @Success 200 {string} string "{"code": 200, "message": "添加成功"}" // @Success 200 {string} string "{"code": -1, "message": "添加失败"}" // @Router /api/v1/post/ [put] @@ -103,7 +103,7 @@ func UpdatePost(c *gin.Context) { // @Tags 岗位 // @Param id path int true "id" // @Success 200 {string} string "{"code": 200, "message": "删除成功"}" -// @Success 200 {string} string "{"code": -1, "message": "删除失败"}" +// @Success 500 {string} string "{"code": 500, "message": "删除失败"}" // @Router /api/v1/post/{postId} [delete] func DeletePost(c *gin.Context) { var data models.Post diff --git a/apis/tools/systables.go b/apis/tools/systables.go index c540d0d..b7db043 100644 --- a/apis/tools/systables.go +++ b/apis/tools/systables.go @@ -24,11 +24,11 @@ func GetSysTableList(c *gin.Context) { var pageIndex = 1 if size := c.Request.FormValue("pageSize"); size != "" { - pageSize = tools2.StrToInt(err, size) + pageSize, err = tools2.StringToInt(size) } if index := c.Request.FormValue("pageIndex"); index != "" { - pageIndex = tools2.StrToInt(err, index) + pageIndex, err = tools2.StringToInt(index) } data.TBName = c.Request.FormValue("tableName") @@ -185,7 +185,7 @@ func genTableInit(tablesList []string, i int, c *gin.Context) (tools.SysTables, // @Tags 工具 - 生成表 // @Accept application/json // @Product application/json -// @Param data body models.Dept true "body" +// @Param data body tools.SysTables true "body" // @Success 200 {string} string "{"code": 200, "message": "添加成功"}" // @Success 200 {string} string "{"code": -1, "message": "添加失败"}" // @Router /api/v1/sys/tables/info [put]