完善分页开关

master
jiang4869 3 years ago
parent 1278831995
commit dbd29c8ecc

@ -258,6 +258,7 @@ func (obj *_{{$obj.StructName}}Mgr) GetByOptions(opts ...Option) (results []*{{$
return
}
{{if $obj.IsOutPage}}
// SelectPage 分页查询
func (obj *_{{$obj.StructName}}Mgr) SelectPage(page IPage,opts ...Option) (resultPage IPage, err error) {
options := options{
@ -280,6 +281,7 @@ func (obj *_{{$obj.StructName}}Mgr) SelectPage(page IPage,opts ...Option) (resul
resultPage.SetRecords(results)
return
}
{{end}}
//////////////////////////enume case ////////////////////////////////////////////

@ -117,6 +117,7 @@ type funDef struct {
Em []EmInfo // index 列表
Primary []FList // primary unique
Index []FList // index
IsOutPage bool // 是否开启分页
}
//

@ -349,6 +349,7 @@ func (m *_Model) generateFunc() (genOut []GenOutInfo) {
// wxw 2021.2.26 17:17
var data funDef
data.TableName = tab.Name
data.IsOutPage = config.GetIsOutPage() // 添加分页开关
tab.Name = getTableNameWithPrefix(tab.Name)
data.StructName = getCamelName(tab.Name)

Loading…
Cancel
Save