@@ -6,67 +6,67 @@ import (
66 "gin-vue-admin/model/request"
77)
88
9- //@author: [piexlmax](https://github.com/piexlmax)
10- //@function: Create { {.StructName } }
11- //@description: 创建 { {.StructName} }记录
12- //@param: { {.Abbreviation } } model. { {. StructName} }
13- //@return: err error
14-
9+ // Create { {.StructName } } 创建 { {.StructName } }记录
10+ // @author: [piexlmax](https://github.com/piexlmax)
11+ // @function: Create { {.StructName} }
12+ // @description: 创建 { {.StructName} }记录
13+ // @param: { {.Abbreviation } } model. { {.StructName } }
14+ // @return: err error
1515func Create{ {.StructName} }({ {.Abbreviation} } model.{ {.StructName} }) (err error) {
1616 err = global.GVA_DB.Create(&{{.Abbreviation} }).Error
1717 return err
1818}
1919
20- //@author: [piexlmax](https://github.com/piexlmax)
21- //@function: Delete { {.StructName } }
22- //@description: 删除 { {.StructName} }记录
23- //@param: { {.Abbreviation } } model. { {. StructName} }
24- //@return: err error
25-
20+ // Delete { {.StructName } } 删除 { {.StructName } }记录
21+ // @author: [piexlmax](https://github.com/piexlmax)
22+ // @function: Delete { {.StructName} }
23+ // @description: 删除 { {.StructName} }记录
24+ // @param: { {.Abbreviation } } model. { {.StructName } }
25+ // @return: err error
2626func Delete{ {.StructName} }({ {.Abbreviation} } model.{ {.StructName} }) (err error) {
2727 err = global.GVA_DB.Delete(&{{.Abbreviation} }).Error
2828 return err
2929}
3030
31- //@author: [piexlmax](https://github.com/piexlmax)
32- //@function: Delete { {.StructName } }ByIds
33- //@description: 批量删除 { {.StructName} }记录
34- //@param: ids request.IdsReq
35- //@return: err error
36-
31+ // Delete { {.StructName } }ByIds 批量删除 { {.StructName } }记录
32+ // @author: [piexlmax](https://github.com/piexlmax)
33+ // @function: Delete { {.StructName} }ByIds
34+ // @description: 批量删除 { {.StructName } }记录
35+ // @param: ids request.IdsReq
36+ // @return: err error
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- //@author: [piexlmax](https://github.com/piexlmax)
43- //@function: Update { {.StructName } }
44- //@description: 更新 { {.StructName} }记录
45- //@param: { {.Abbreviation } } *model. { {. StructName} }
46- //@return: err error
47-
42+ // Update { {.StructName } } 更新 { {.StructName } }记录
43+ // @author: [piexlmax](https://github.com/piexlmax)
44+ // @function: Update { {.StructName} }
45+ // @description: 更新 { {.StructName} }记录
46+ // @param: { {.Abbreviation } } *model. { {.StructName } }
47+ // @return: err error
4848func Update{ {.StructName} }({ {.Abbreviation} } model.{ {.StructName} }) (err error) {
4949 err = global.GVA_DB.Save(&{{.Abbreviation} }).Error
5050 return err
5151}
5252
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 } }
58-
53+ // Get { {.StructName } } 根据id获取 { {.StructName } }记录
54+ // @author: [piexlmax](https://github.com/piexlmax)
55+ // @function: Get { {.StructName} }
56+ // @description: 根据id获取 { {.StructName } }记录
57+ // @param: id uint
58+ // @return: err error, { {.Abbreviation } } model. { {.StructName } }
5959func Get{ {.StructName} }(id uint) (err error, { {.Abbreviation} } model.{ {.StructName} }) {
6060 err = global.GVA_DB.Where(" id = ?" , id).First(&{{.Abbreviation} }).Error
6161 return
6262}
6363
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
69-
64+ // Get { {.StructName } }InfoList 分页获取 { {.StructName } }记录
65+ // @author: [piexlmax](https://github.com/piexlmax)
66+ // @function: Get { {.StructName} }InfoList
67+ // @description: 分页获取 { {.StructName} }记录
68+ // @param: info request. { {.StructName } }Search
69+ // @return: err error, list interface { } , total int64
7070func Get{ {.StructName} }InfoList(info request.{ {.StructName} }Search) (err error, list interface{ } , total int64) {
7171 limit := info.PageSize
7272 offset := info.PageSize * (info.Page - 1)
0 commit comments