修复分页搜索问题

This commit is contained in:
pggiroro
2024-02-26 15:06:20 +08:00
parent b4ec04fc9d
commit cb3ad3bebe

View File

@@ -158,7 +158,7 @@ func (conf *RecordConfig) API_list_page(w http.ResponseWriter, r *http.Request)
if pageNumInt > 0 { if pageNumInt > 0 {
totalPageCount = (totalCount / pageSizeInt) + 1 //总页数 totalPageCount = (totalCount / pageSizeInt) + 1 //总页数
remainCount := totalCount % pageSizeInt //分页后剩余条数 remainCount := totalCount % pageSizeInt //分页后剩余条数
if remainCount == 0 { if remainCount == 0 && totalPageCount != 1 {
totalPageCount = totalCount / pageSizeInt totalPageCount = totalCount / pageSizeInt
} }
if pageNumInt > totalPageCount { if pageNumInt > totalPageCount {
@@ -245,7 +245,7 @@ func (conf *RecordConfig) API_list_recording_page(w http.ResponseWriter, r *http
if pageNumInt > 0 { if pageNumInt > 0 {
totalPageCount = (totalCount / pageSizeInt) + 1 //总页数 totalPageCount = (totalCount / pageSizeInt) + 1 //总页数
remainCount := totalCount % pageSizeInt //分页后剩余条数 remainCount := totalCount % pageSizeInt //分页后剩余条数
if remainCount == 0 { if remainCount == 0 && totalPageCount != 1 {
totalPageCount = totalCount / pageSizeInt totalPageCount = totalCount / pageSizeInt
} }
if pageNumInt > totalPageCount { if pageNumInt > totalPageCount {