fix(backend): 入库/出库列表 status 支持多状态 IN 查询 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -343,4 +343,9 @@ func TestStockInHandler_List_FilterByStatus(t *testing.T) {
|
||||
w = makeRequest(r, "GET", "/api/v1/stock-in/orders?status=draft", token, nil)
|
||||
resp = parseResponse(w)
|
||||
assert.Equal(t, float64(1), resp["total"].(float64))
|
||||
|
||||
// 逗号分隔的多状态:pending + draft 应返回两条(审核标签页用法)
|
||||
w = makeRequest(r, "GET", "/api/v1/stock-in/orders?status=pending,draft", token, nil)
|
||||
resp = parseResponse(w)
|
||||
assert.Equal(t, float64(2), resp["total"].(float64))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user