优化后台列表搜索

This commit is contained in:
yml2213
2026-06-21 13:17:10 +08:00
parent a0145e6b18
commit 23dbe9af22
11 changed files with 166 additions and 21 deletions
+9 -1
View File
@@ -4,6 +4,7 @@ import (
"errors"
"net/http"
"strconv"
"strings"
"hfb_sys/backend/internal/middleware"
"hfb_sys/backend/pkg/response"
@@ -113,7 +114,14 @@ func (h *Handler) CancelByOrder(c *gin.Context) {
func (h *Handler) AdminList(c *gin.Context) {
page, pageSize := parsePagination(c)
result, err := h.service.ListAdmin(c.Request.Context(), page, pageSize)
query := AdminListQuery{
Page: page,
PageSize: pageSize,
Keyword: strings.TrimSpace(c.Query("keyword")),
Status: strings.TrimSpace(c.Query("status")),
Type: strings.TrimSpace(c.Query("type")),
}
result, err := h.service.ListAdmin(c.Request.Context(), query)
if err != nil {
writeDisputeError(c, err)
return