@@ -31,7 +31,7 @@ type {{$name}} struct {
31
31
// @Success 200 { object} util.ResponseResult{ data= []schema.{{$name } }}
32
32
// @Failure 401 { object} util.ResponseResult
33
33
// @Failure 500 { object} util.ResponseResult
34
- // @Router /api/v1/{ {if .FillRouterPrefix} }{ {lower .ModuleName } }/{ {end} }{ {lowerHyphensPlural .Name} } [get]
34
+ // @Router /api/v1/{ {if .FillRouterPrefix} }{ {lower .Module } }/{ {end} }{ {lowerHyphensPlural .Name} } [get]
35
35
func (a *{ {$name } }) Query(c *gin.Context) {
36
36
ctx := c.Request.Context()
37
37
var params schema.{{$name } }QueryParam
@@ -55,7 +55,7 @@ func (a *{{$name}}) Query(c *gin.Context) {
55
55
// @Success 200 { object} util.ResponseResult{ data= schema.{{$name } }}
56
56
// @Failure 401 { object} util.ResponseResult
57
57
// @Failure 500 { object} util.ResponseResult
58
- // @Router /api/v1/{ {if .FillRouterPrefix} }{ {lower .ModuleName } }/{ {end} }{ {lowerHyphensPlural .Name} }/{ id} [get]
58
+ // @Router /api/v1/{ {if .FillRouterPrefix} }{ {lower .Module } }/{ {end} }{ {lowerHyphensPlural .Name} }/{ id} [get]
59
59
func (a *{ {$name } }) Get(c *gin.Context) {
60
60
ctx := c.Request.Context()
61
61
item, err := a.{{$name } }BIZ.Get(ctx, c.Param("id"))
@@ -74,7 +74,7 @@ func (a *{{$name}}) Get(c *gin.Context) {
74
74
// @Failure 400 { object} util.ResponseResult
75
75
// @Failure 401 { object} util.ResponseResult
76
76
// @Failure 500 { object} util.ResponseResult
77
- // @Router /api/v1/{ {if .FillRouterPrefix} }{ {lower .ModuleName } }/{ {end} }{ {lowerHyphensPlural .Name} } [post]
77
+ // @Router /api/v1/{ {if .FillRouterPrefix} }{ {lower .Module } }/{ {end} }{ {lowerHyphensPlural .Name} } [post]
78
78
func (a *{ {$name } }) Create(c *gin.Context) {
79
79
ctx := c.Request.Context()
80
80
item := new(schema.{{$name } }Form)
@@ -103,7 +103,7 @@ func (a *{{$name}}) Create(c *gin.Context) {
103
103
// @Failure 400 { object} util.ResponseResult
104
104
// @Failure 401 { object} util.ResponseResult
105
105
// @Failure 500 { object} util.ResponseResult
106
- // @Router /api/v1/{ {if .FillRouterPrefix} }{ {lower .ModuleName } }/{ {end} }{ {lowerHyphensPlural .Name} }/{ id} [put]
106
+ // @Router /api/v1/{ {if .FillRouterPrefix} }{ {lower .Module } }/{ {end} }{ {lowerHyphensPlural .Name} }/{ id} [put]
107
107
func (a *{ {$name } }) Update(c *gin.Context) {
108
108
ctx := c.Request.Context()
109
109
item := new(schema.{{$name } }Form)
@@ -130,7 +130,7 @@ func (a *{{$name}}) Update(c *gin.Context) {
130
130
// @Success 200 { object} util.ResponseResult
131
131
// @Failure 401 { object} util.ResponseResult
132
132
// @Failure 500 { object} util.ResponseResult
133
- // @Router /api/v1/{ {if .FillRouterPrefix} }{ {lower .ModuleName } }/{ {end} }{ {lowerHyphensPlural .Name} }/{ id} [delete]
133
+ // @Router /api/v1/{ {if .FillRouterPrefix} }{ {lower .Module } }/{ {end} }{ {lowerHyphensPlural .Name} }/{ id} [delete]
134
134
func (a *{ {$name } }) Delete(c *gin.Context) {
135
135
ctx := c.Request.Context()
136
136
err := a.{{$name } }BIZ.Delete(ctx, c.Param("id"))
0 commit comments