- dao.GetLastTotalRowCount
This commit is contained in:
@@ -628,12 +628,10 @@ func GetJdPromotions(ctx *jxcontext.Context, keyword string, params map[string]i
|
||||
}
|
||||
}
|
||||
}
|
||||
pagedInfo = &model.PagedInfo{}
|
||||
countInfo := &struct{ Ct int }{}
|
||||
if err = dao.GetRow(db, countInfo, "SELECT FOUND_ROWS() ct"); err == nil {
|
||||
pagedInfo.TotalCount = countInfo.Ct
|
||||
pagedInfo = &model.PagedInfo{
|
||||
TotalCount: dao.GetLastTotalRowCount(db),
|
||||
Data: promotionList,
|
||||
}
|
||||
pagedInfo.Data = promotionList
|
||||
}
|
||||
dao.Commit(db)
|
||||
return pagedInfo, err
|
||||
|
||||
Reference in New Issue
Block a user