This commit is contained in:
aozhiwei 2024-08-06 13:45:00 +08:00
parent b8908835b4
commit e518a45f3c
2 changed files with 24 additions and 3 deletions

View File

@ -15,8 +15,29 @@ type MailApi struct {
}
func (this *MailApi) ListMail(c *gin.Context) {
mails := []system.Mail{}
f5.GetApp().GetOrmDb(constant.MAIL_DB).Find(&mails)
var pageSize int32 = 100
var cursor int64 = 0
orderBy := ""
sql := "SELECT * FROM t_mail"
subFilters := []f5.DbQueryFilter{}
mails := []*system.Mail{}
f5.GetGoStyleDb().StreamPageQuery(
constant.MAIL_DB,
pageSize,
cursor,
sql,
[]string{
},
f5.GetDbFilter().Comp(subFilters...),
orderBy,
func (err error, pagination *f5.StreamPagination) {
//rspObj.Page.FillPage(pagination)
},
func (ds *f5.DataSet) {
p := new(system.Mail)
f5.UnmarshalModel(ds, p)
q5.AppendSlice(&mails, p)
})
c.JSON(http.StatusOK, gin.H{
"code": 0,
"message": "",

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit cf0959d4bd0cee6e8cad378defe82fd478851368
Subproject commit 26d8a01994efda115ee81d570075f00ebd05eb21