mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 10:13:01 +00:00
fix:Invalid post search criteria
This commit is contained in:
+15
-14
@@ -7,12 +7,13 @@ import (
|
||||
"go-admin/tools/app"
|
||||
)
|
||||
|
||||
// @Summary 职位列表数据
|
||||
// @Summary 岗位列表数据
|
||||
// @Description 获取JSON
|
||||
// @Tags 职位
|
||||
// @Param name query string false "name"
|
||||
// @Param id query string false "id"
|
||||
// @Param position query string false "position"
|
||||
// @Tags 岗位
|
||||
// @Param postName query string false "postName"
|
||||
// @Param postCode query string false "postCode"
|
||||
// @Param postId query string false "postId"
|
||||
// @Param status query string false "status"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/post [get]
|
||||
// @Security
|
||||
@@ -30,7 +31,7 @@ func GetPostList(c *gin.Context) {
|
||||
pageIndex = tools.StrToInt(err, index)
|
||||
}
|
||||
|
||||
data.PostName = c.Request.FormValue("postName")
|
||||
data.PostCode = c.Request.FormValue("postCode")
|
||||
id := c.Request.FormValue("postId")
|
||||
data.PostId, _ = tools.StringToInt(id)
|
||||
|
||||
@@ -41,9 +42,9 @@ func GetPostList(c *gin.Context) {
|
||||
app.PageOK(c, result, count, pageIndex, pageSize, "")
|
||||
}
|
||||
|
||||
// @Summary 获取字典数据
|
||||
// @Summary 获取岗位信息
|
||||
// @Description 获取JSON
|
||||
// @Tags 字典数据
|
||||
// @Tags 岗位
|
||||
// @Param postId path int true "postId"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/post/{postId} [get]
|
||||
@@ -56,9 +57,9 @@ func GetPost(c *gin.Context) {
|
||||
app.OK(c,result,"")
|
||||
}
|
||||
|
||||
// @Summary 添加职位
|
||||
// @Summary 添加岗位
|
||||
// @Description 获取JSON
|
||||
// @Tags 职位
|
||||
// @Tags 岗位
|
||||
// @Accept application/json
|
||||
// @Product application/json
|
||||
// @Param data body models.Post true "data"
|
||||
@@ -76,9 +77,9 @@ func InsertPost(c *gin.Context) {
|
||||
app.OK(c,result,"")
|
||||
}
|
||||
|
||||
// @Summary 修改职位
|
||||
// @Summary 修改岗位
|
||||
// @Description 获取JSON
|
||||
// @Tags 职位
|
||||
// @Tags 岗位
|
||||
// @Accept application/json
|
||||
// @Product application/json
|
||||
// @Param data body models.Dept true "body"
|
||||
@@ -97,9 +98,9 @@ func UpdatePost(c *gin.Context) {
|
||||
app.OK(c,result,"修改成功")
|
||||
}
|
||||
|
||||
// @Summary 删除职位
|
||||
// @Summary 删除岗位
|
||||
// @Description 删除数据
|
||||
// @Tags 职位
|
||||
// @Tags 岗位
|
||||
// @Param id path int true "id"
|
||||
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
|
||||
// @Success 200 {string} string "{"code": -1, "message": "删除失败"}"
|
||||
|
||||
Reference in New Issue
Block a user