优化违禁词

This commit is contained in:
2026-07-06 12:18:09 +08:00
parent 713cca8f67
commit 89e0a9df9f
20 changed files with 412 additions and 94 deletions
+2 -2
View File
@@ -79,7 +79,7 @@ func (h *PaymentHandler) MyOrders(c *gin.Context) {
}
limit := parseInt(c.Query("limit"), 20)
offset := parseInt(c.Query("offset"), 0)
orders, total, err := h.pay.ListByUser(c.Request.Context(), user.ID, c.Query("status"), limit, offset)
orders, total, err := h.pay.ListByUser(c.Request.Context(), user.ID, c.Query("status"), strings.TrimSpace(c.Query("q")), limit, offset)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"detail": "failed to load orders"})
return
@@ -129,7 +129,7 @@ func (h *PaymentHandler) AdminOrders(c *gin.Context) {
status := c.Query("status")
limit := parseInt(c.Query("limit"), 100)
offset := parseInt(c.Query("offset"), 0)
orders, total, err := h.pay.ListAll(c.Request.Context(), status, limit, offset)
orders, total, err := h.pay.ListAll(c.Request.Context(), status, strings.TrimSpace(c.Query("q")), limit, offset)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"detail": "failed to load orders"})
return