fix🐛: Merge pull request #689 from zyd/master

修复模板get update delete错误
This commit is contained in:
wenjianzhang authored and GitHub committed 2022-08-16 11:58:33 +08:00
commit 5bec640f20
1 file changed
+3 -2
+3 -2
View File
@@ -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