fix: 回写档口入库码时 t 固定为 0 (#278)

顺运宝把 t 绑成 Java Integer,毫秒时间戳溢出后 19 号回写全部失败。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
chengma
2026-08-19 11:28:18 +08:00
co-authored by Cursor
parent 08a5d8c3d0
commit 417cd73afa
3 changed files with 20 additions and 4 deletions
+7 -1
View File
@@ -582,7 +582,13 @@ func TestClient_InnerCodeWrite_单件码参数和路径正确且只发送一次(
}
case "/am/stock/detail/updateDetailCode":
query := r.URL.Query()
if r.Method != http.MethodPost || query.Get("t") == "" || query.Get("id") != "11" || query.Get("detailId") != "22" || query.Get("code") != targetCode {
if r.Method != http.MethodPost {
t.Errorf("update method=%s", r.Method)
}
if query.Get("t") != "0" {
t.Errorf("t 必须固定为 0 以适配顺运宝 Integer,实际 %q", query.Get("t"))
}
if query.Get("id") != "11" || query.Get("detailId") != "22" || query.Get("code") != targetCode {
t.Errorf("update query=%v", query)
}
default: