chore: release server-v1.0.65
Deploy Server / release-deploy-server (push) Successful in 1m5s

fix(backend): 入库/出库列表 status 支持多状态 IN 查询

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-20 12:19:46 +08:00
parent 648d9bc0d5
commit 50b5c9fccb
4 changed files with 14 additions and 2 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package handler
import (
"net/http"
"strconv"
"strings"
"github.com/gin-gonic/gin"
"gorm.io/gorm"
@@ -33,7 +34,7 @@ func (h *StockOutHandler) List(c *gin.Context) {
Where("shop_id = ? AND deleted_at IS NULL", shopID)
if status := c.Query("status"); status != "" {
query = query.Where("status = ?", status)
query = query.Where("status IN ?", strings.Split(status, ","))
}
if startDate := c.Query("start_date"); startDate != "" {
query = query.Where("order_date >= ?", startDate)