修复模板get update delete错误
This commit is contained in:
1 parent
df8ab39aa0
commit
62d9084ee8
1 file changed
+4
-3
@@ -65,7 +65,7 @@ func (e {{.ClassName}}) GetPage(c *gin.Context) {
|
|||||||
// @Summary 获取{{.TableComment}}
|
// @Summary 获取{{.TableComment}}
|
||||||
// @Description 获取{{.TableComment}}
|
// @Description 获取{{.TableComment}}
|
||||||
// @Tags {{.TableComment}}
|
// @Tags {{.TableComment}}
|
||||||
// @Param id path string false "id"
|
// @Param id path int false "id"
|
||||||
// @Success 200 {object} response.Response{data=models.{{.ClassName}}} "{"code": 200, "data": [...]}"
|
// @Success 200 {object} response.Response{data=models.{{.ClassName}}} "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/{{.ModuleName}}/{id} [get]
|
// @Router /api/v1/{{.ModuleName}}/{id} [get]
|
||||||
// @Security Bearer
|
// @Security Bearer
|
||||||
@@ -135,6 +135,7 @@ func (e {{.ClassName}}) Insert(c *gin.Context) {
|
|||||||
// @Tags {{.TableComment}}
|
// @Tags {{.TableComment}}
|
||||||
// @Accept application/json
|
// @Accept application/json
|
||||||
// @Product application/json
|
// @Product application/json
|
||||||
|
// @Param id path int true "id"
|
||||||
// @Param data body dto.{{.ClassName}}UpdateReq true "body"
|
// @Param data body dto.{{.ClassName}}UpdateReq true "body"
|
||||||
// @Success 200 {object} response.Response "{"code": 200, "message": "修改成功"}"
|
// @Success 200 {object} response.Response "{"code": 200, "message": "修改成功"}"
|
||||||
// @Router /api/v1/{{.ModuleName}}/{id} [put]
|
// @Router /api/v1/{{.ModuleName}}/{id} [put]
|
||||||
@@ -167,7 +168,7 @@ func (e {{.ClassName}}) Update(c *gin.Context) {
|
|||||||
// @Summary 删除{{.TableComment}}
|
// @Summary 删除{{.TableComment}}
|
||||||
// @Description 删除{{.TableComment}}
|
// @Description 删除{{.TableComment}}
|
||||||
// @Tags {{.TableComment}}
|
// @Tags {{.TableComment}}
|
||||||
// @Param ids body []int false "ids"
|
// @Param data body dto.{{.ClassName}}DeleteReq true "body"
|
||||||
// @Success 200 {object} response.Response "{"code": 200, "message": "删除成功"}"
|
// @Success 200 {object} response.Response "{"code": 200, "message": "删除成功"}"
|
||||||
// @Router /api/v1/{{.ModuleName}} [delete]
|
// @Router /api/v1/{{.ModuleName}} [delete]
|
||||||
// @Security Bearer
|
// @Security Bearer
|
||||||
@@ -194,4 +195,4 @@ func (e {{.ClassName}}) Delete(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
e.OK( req.GetId(), "删除成功")
|
e.OK( req.GetId(), "删除成功")
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user