diff --git a/app/admin/apis/sys_post.go b/app/admin/apis/sys_post.go index 33911fb8..a12d54a2 100644 --- a/app/admin/apis/sys_post.go +++ b/app/admin/apis/sys_post.go @@ -2,6 +2,7 @@ package apis import ( "fmt" + "github.com/gin-gonic/gin" "github.com/gin-gonic/gin/binding" "github.com/go-admin-team/go-admin-core/sdk/api" @@ -93,8 +94,7 @@ func (e SysPost) Get(c *gin.Context) { // @Accept application/json // @Product application/json // @Param data body dto.SysPostInsertReq true "data" -// @Success 200 {string} string "{"code": 200, "message": "添加成功"}" -// @Success 200 {string} string "{"code": -1, "message": "添加失败"}" +// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Router /api/v1/post [post] // @Security Bearer func (e SysPost) Insert(c *gin.Context) { @@ -126,8 +126,7 @@ func (e SysPost) Insert(c *gin.Context) { // @Accept application/json // @Product application/json // @Param data body dto.SysPostUpdateReq true "body" -// @Success 200 {string} string "{"code": 200, "message": "添加成功"}" -// @Success 200 {string} string "{"code": -1, "message": "添加失败"}" +// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Router /api/v1/post/{id} [put] // @Security Bearer func (e SysPost) Update(c *gin.Context) { @@ -159,8 +158,7 @@ func (e SysPost) Update(c *gin.Context) { // @Description 删除数据 // @Tags 岗位 // @Param id body dto.SysPostDeleteReq true "请求参数" -// @Success 200 {string} string "{"code": 200, "message": "删除成功"}" -// @Success 500 {string} string "{"code": 500, "message": "删除失败"}" +// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Router /api/v1/post [delete] // @Security Bearer func (e SysPost) Delete(c *gin.Context) { @@ -183,4 +181,4 @@ func (e SysPost) Delete(c *gin.Context) { return } e.OK(req.GetId(), "删除成功") -} +} \ No newline at end of file