From 62d9084ee8bf0f95e9cdad3233092a0bd24231e0 Mon Sep 17 00:00:00 2001 From: zhaoyidong Date: Tue, 16 Aug 2022 11:41:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A8=A1=E6=9D=BFget=20updat?= =?UTF-8?q?e=20delete=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/v4/no_actions/apis.go.template | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/template/v4/no_actions/apis.go.template b/template/v4/no_actions/apis.go.template index 08c09268..8e85d8c9 100644 --- a/template/v4/no_actions/apis.go.template +++ b/template/v4/no_actions/apis.go.template @@ -65,7 +65,7 @@ func (e {{.ClassName}}) GetPage(c *gin.Context) { // @Summary 获取{{.TableComment}} // @Description 获取{{.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": [...]}" // @Router /api/v1/{{.ModuleName}}/{id} [get] // @Security Bearer @@ -135,6 +135,7 @@ func (e {{.ClassName}}) Insert(c *gin.Context) { // @Tags {{.TableComment}} // @Accept application/json // @Product application/json +// @Param id path int true "id" // @Param data body dto.{{.ClassName}}UpdateReq true "body" // @Success 200 {object} response.Response "{"code": 200, "message": "修改成功"}" // @Router /api/v1/{{.ModuleName}}/{id} [put] @@ -167,7 +168,7 @@ func (e {{.ClassName}}) Update(c *gin.Context) { // @Summary 删除{{.TableComment}} // @Description 删除{{.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": "删除成功"}" // @Router /api/v1/{{.ModuleName}} [delete] // @Security Bearer @@ -194,4 +195,4 @@ func (e {{.ClassName}}) Delete(c *gin.Context) { return } e.OK( req.GetId(), "删除成功") -} \ No newline at end of file +}