fix(jpush): correct SendNo field type from int64 to string in PushResponse
All checks were successful
Build Backend / build (push) Successful in 1m56s
Build Backend / build-docker (push) Successful in 1m33s

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.
This commit is contained in:
lafay
2026-04-28 00:18:51 +08:00
parent 56c61f1895
commit 179e468131

View File

@@ -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