@@ -6,67 +6,66 @@ import (
66 "gin-vue-admin/model/request"
77)
88
9- // @title Create { {.StructName } }
10- // @description create a { {.StructName} }
11- // @param { {.Abbreviation } } model. { {. StructName} }
12- // @auth (2020/04/05 20:22)
13- // @return err error
9+ //@author: [piexlmax](https://github.com/piexlmax)
10+ //@function: Create { {.StructName} }
11+ //@description: 创建 { {.StructName} }记录
12+ //@param: { {.Abbreviation } } model. { {.StructName } }
13+ //@return: err error
1414
1515func Create{ {.StructName} }({ {.Abbreviation} } model.{ {.StructName} }) (err error) {
1616 err = global.GVA_DB.Create(&{{.Abbreviation} }).Error
1717 return err
1818}
1919
20- // @title Delete { {.StructName } }
21- // @description delete a { {.StructName} }
22- // @auth (2020/04/05 20:22)
23- // @param { {.Abbreviation} } model.{ {.StructName} }
24- // @return error
20+ //@author: [piexlmax](https://github.com/piexlmax)
21+ //@function: Delete { {.StructName} }
22+ //@description: 删除 { {.StructName } }记录
23+ //@param: { {.Abbreviation} } model.{ {.StructName} }
24+ //@return: err error
2525
2626func Delete{ {.StructName} }({ {.Abbreviation} } model.{ {.StructName} }) (err error) {
2727 err = global.GVA_DB.Delete({{.Abbreviation} }).Error
2828 return err
2929}
3030
31- // @title Delete { {.StructName } }ByIds
32- // @description delete { {.StructName} }s
33- // @auth (2020/04/05 20:22)
34- // @param { {.Abbreviation } } model. { {.StructName } }
35- // @return error
31+ //@author: [piexlmax](https://github.com/piexlmax)
32+ //@function: Delete { {.StructName} }ByIds
33+ //@description: 批量删除 { {.StructName } }记录
34+ //@param: ids request.IdsReq
35+ //@return: err error
3636
3737func Delete{ {.StructName} }ByIds(ids request.IdsReq) (err error) {
3838 err = global.GVA_DB.Delete(&[]model.{{.StructName} }{ } ,"id in ?",ids.Ids).Error
3939 return err
4040}
4141
42- // @title Update { {.StructName } }
43- // @description update a { {.StructName} }
44- // @param { {.Abbreviation } } *model. { {. StructName} }
45- // @auth (2020/04/05 20:22)
46- // @return error
42+ //@author: [piexlmax](https://github.com/piexlmax)
43+ //@function: Update { {.StructName} }
44+ //@description: 更新 { {.StructName} }记录
45+ //@param: { {.Abbreviation } } *model. { {.StructName } }
46+ //@return: err error
4747
4848func Update{ {.StructName} }({ {.Abbreviation} } *model.{ {.StructName} }) (err error) {
4949 err = global.GVA_DB.Save({{.Abbreviation} }).Error
5050 return err
5151}
5252
53- // @title Get{ {.StructName} }
54- // @description get the info of a { {.StructName} }
55- // @auth (2020/04/05 20:22)
56- // @param id uint
57- // @return error
58- // @return { {.StructName} } { {.StructName} }
53+ //@author: [piexlmax](https://github.com/piexlmax)
54+ //@function: Get{ {.StructName} }
55+ //@description: 根据id获取{ {.StructName} }记录
56+ //@param: id uint
57+ //@return: err error, { {.Abbreviation} } model.{ {.StructName} }
5958
6059func Get{ {.StructName} }(id uint) (err error, { {.Abbreviation} } model.{ {.StructName} }) {
6160 err = global.GVA_DB.Where(" id = ?" , id).First(&{{.Abbreviation} }).Error
6261 return
6362}
6463
65- // @title Get { {.StructName } }InfoList
66- // @description get { {.StructName} } list by pagination, 分页获取 { {.StructName } }
67- // @auth (2020/04/05 20:22)
68- // @param info PageInfo
69- // @return error
64+ //@author: [piexlmax](https://github.com/piexlmax)
65+ //@function: Get { {.StructName} }InfoList
66+ //@description: 分页获取 { {.StructName } }记录
67+ //@param: info request. { {.StructName } }Search
68+ //@return: err error, list interface { } , total int64
7069
7170func Get{ {.StructName} }InfoList(info request.{ {.StructName} }Search) (err error, list interface{ } , total int64) {
7271 limit := info.PageSize
0 commit comments