From e6959954e75b0962520ff433481715f4701f8f52 Mon Sep 17 00:00:00 2001 From: u Date: Thu, 2 Mar 2023 16:29:46 +0800 Subject: [PATCH] 'fix' --- hasaki-gen-crud/template.go | 85 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/hasaki-gen-crud/template.go b/hasaki-gen-crud/template.go index 9e94621..a86ab87 100644 --- a/hasaki-gen-crud/template.go +++ b/hasaki-gen-crud/template.go @@ -343,6 +343,23 @@ func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper, a authority = authoritys[0] } + /* + @yapi + + @group TempLowHead3A60 + + @name 获取(Prefix3A60-TempLowHead3A60)单个数据 + + @path /Prefix3A60/TempLowHead3A60/get + + @markdown + + ## + ``` + 传入主键获取对应数据 + ``` + @end + */ router.Any("/Prefix3A60/TempLowHead3A60/get", func(ctx *hskgin.GinContextHelper) { req := &Temp3A60{} ctx.Bind(req) @@ -353,6 +370,23 @@ func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper, a ctx.DisplayByData(req) }) + /* + @yapi + + @group TempLowHead3A60 + + @name 保存(Prefix3A60-TempLowHead3A60)单个数据 + + @path /Prefix3A60/TempLowHead3A60/save + + @markdown + + ## + ``` + 传入整体数据插入或者保存(取决于主键是否存在) + ``` + @end + */ router.Any("/Prefix3A60/TempLowHead3A60/save", func(ctx *hskgin.GinContextHelper) { req := &Temp3A60{} ctx.Bind(&req) @@ -365,6 +399,23 @@ func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper, a ctx.DisplayByData(req) }) + /* + @yapi + + @group TempLowHead3A60 + + @name 获取(Prefix3A60-TempLowHead3A60)无分页数据 + + @path /Prefix3A60/TempLowHead3A60/data + + @markdown + + ## + ``` + 获取数据列表,无分页 + ``` + @end + */ router.Any("/Prefix3A60/TempLowHead3A60/data", func(ctx *hskgin.GinContextHelper) { req := &Temp3A60{} ctx.Bind(&req) @@ -374,6 +425,23 @@ func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper, a ctx.DisplayByData(data) }) + /* + @yapi + + @group TempLowHead3A60 + + @name 获取(Prefix3A60-TempLowHead3A60)分页数据 + + @path /Prefix3A60/TempLowHead3A60/list + + @markdown + + ## + ``` + 获取数据列表,分页,page参数 + ``` + @end + */ router.Any("/Prefix3A60/TempLowHead3A60/list", func(ctx *hskgin.GinContextHelper) { req := &Temp3A60{} ctx.Bind(&req) @@ -384,6 +452,23 @@ func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper, a ctx.DisplayByPage(data, count) }) + /* + @yapi + + @group TempLowHead3A60 + + @name 删除一条(Prefix3A60-TempLowHead3A60)数据 + + @path /Prefix3A60/TempLowHead3A60/delete + + @markdown + + ## + ``` + 传入主键参数,删除一条数据 + ``` + @end + */ router.Any("/Prefix3A60/TempLowHead3A60/delete", func(ctx *hskgin.GinContextHelper) { req := &Temp3A60{} ctx.Bind(&req)