mirror of
https://github.com/tiger1103/gfast.git
synced 2026-09-21 18:20:47 +00:00
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
// ==========================================================================
|
|
// 生成日期:{{.table.CreateTime}}
|
|
// 生成人:{{.table.FunctionAuthor}}
|
|
// ==========================================================================
|
|
package {{.table.BusinessName}}
|
|
|
|
import (
|
|
{{.table.BusinessName}}Model "{{.table.PackageName}}/app/model/{{.table.ModuleName}}/{{.table.BusinessName}}"
|
|
)
|
|
|
|
|
|
// 添加
|
|
func AddSave(req *{{.table.BusinessName}}Model.AddReq) error {
|
|
return {{.table.BusinessName}}Model.AddSave(req)
|
|
}
|
|
|
|
// 删除
|
|
func DeleteByIds(Ids []int) error {
|
|
return {{.table.BusinessName}}Model.DeleteByIds(Ids)
|
|
}
|
|
|
|
//修改
|
|
func EditSave(editReq *{{.table.BusinessName}}Model.EditReq) error {
|
|
return {{.table.BusinessName}}Model.EditSave(editReq)
|
|
}
|
|
|
|
// 根据ID查询
|
|
func GetByID(id int64) (*{{.table.BusinessName}}Model.Entity, error) {
|
|
return {{.table.BusinessName}}Model.GetByID(id)
|
|
}
|
|
|
|
// 分页查询
|
|
func SelectListByPage(req *{{.table.BusinessName}}Model.SelectPageReq) (total int, page int64, list []*{{.table.BusinessName}}Model.Entity, err error) {
|
|
return {{.table.BusinessName}}Model.SelectListByPage(req)
|
|
}
|