Browse Source

'fix'

master
u 2 years ago
parent
commit
e6959954e7
  1. 85
      hasaki-gen-crud/template.go

85
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)

Loading…
Cancel
Save