From 179e46813173ac57df717a9708e0ae7b8bda7a1f Mon Sep 17 00:00:00 2001 From: lafay <2021211506@stu.hit.edu.cn> Date: Tue, 28 Apr 2026 00:18:51 +0800 Subject: [PATCH] fix(jpush): correct SendNo field type from int64 to string in PushResponse The JPush API returns sendno as a string value in the JSON response, but the struct field was incorrectly typed as int64. This fix updates both the struct field type and the corresponding zap logger call to use string type, ensuring proper JSON parsing and logging. --- internal/pkg/jpush/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/pkg/jpush/client.go b/internal/pkg/jpush/client.go index 810979b..e04b3f2 100644 --- a/internal/pkg/jpush/client.go +++ b/internal/pkg/jpush/client.go @@ -86,7 +86,7 @@ type PushOptions struct { type PushResponse struct { MsgID string `json:"msg_id"` - SendNo int64 `json:"sendno"` + SendNo string `json:"sendno"` } type RateLimitInfo struct { @@ -208,7 +208,7 @@ func (c *Client) Push(payload map[string]any) (*PushResponse, *RateLimitInfo, er } else { c.logger.Debug("jpush push response", zap.String("msg_id", result.MsgID), - zap.Int64("send_no", result.SendNo), + zap.String("send_no", result.SendNo), ) } return result, rateLimit, parseErr