功能:增加订单搜索与状态筛选

This commit is contained in:
yml2213
2026-08-13 12:58:06 +08:00
parent 2b3a1b111b
commit ac44fda08b
5 changed files with 79 additions and 8 deletions
+2 -2
View File
@@ -89,9 +89,9 @@ func (h *MerchantHandler) UpdateProductStatus(c *gin.Context) {
func (h *MerchantHandler) ListOrders(c *gin.Context) {
page, size := pageParams(c)
orderSource := strings.TrimSpace(c.Query("order_source"))
list, total, err := h.fulfillmentSvc.ListOrders(middleware.GetMerchantID(c), page, size, c.Query("order_status"), orderSource)
list, total, err := h.fulfillmentSvc.ListOrders(middleware.GetMerchantID(c), page, size, c.Query("order_status"), orderSource, c.Query("keyword"))
if err != nil {
if orderSource != "" && err.Error() == "无效的订单来源" {
if err.Error() == "无效的订单来源" || err.Error() == "无效的订单状态" {
response.BadRequest(c, err.Error())
return
}