@@ -2,6 +2,7 @@ package apis
2
2
3
3
import (
4
4
"fmt"
5
+
5
6
"github.com/gin-gonic/gin"
6
7
"github.com/gin-gonic/gin/binding"
7
8
"github.com/go-admin-team/go-admin-core/sdk/api"
@@ -93,8 +94,7 @@ func (e SysPost) Get(c *gin.Context) {
93
94
// @Accept application/json
94
95
// @Product application/json
95
96
// @Param data body dto.SysPostInsertReq true "data"
96
- // @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
97
- // @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
97
+ // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
98
98
// @Router /api/v1/post [post]
99
99
// @Security Bearer
100
100
func (e SysPost ) Insert (c * gin.Context ) {
@@ -126,8 +126,7 @@ func (e SysPost) Insert(c *gin.Context) {
126
126
// @Accept application/json
127
127
// @Product application/json
128
128
// @Param data body dto.SysPostUpdateReq true "body"
129
- // @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
130
- // @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
129
+ // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
131
130
// @Router /api/v1/post/{id} [put]
132
131
// @Security Bearer
133
132
func (e SysPost ) Update (c * gin.Context ) {
@@ -159,8 +158,7 @@ func (e SysPost) Update(c *gin.Context) {
159
158
// @Description 删除数据
160
159
// @Tags 岗位
161
160
// @Param id body dto.SysPostDeleteReq true "请求参数"
162
- // @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
163
- // @Success 500 {string} string "{"code": 500, "message": "删除失败"}"
161
+ // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
164
162
// @Router /api/v1/post [delete]
165
163
// @Security Bearer
166
164
func (e SysPost ) Delete (c * gin.Context ) {
@@ -183,4 +181,4 @@ func (e SysPost) Delete(c *gin.Context) {
183
181
return
184
182
}
185
183
e .OK (req .GetId (), "删除成功" )
186
- }
184
+ }
0 commit comments