From 9a82fa034fbf4ca52e6a970285be1f0c040177f9 Mon Sep 17 00:00:00 2001 From: renzhiyuan <465386466@qq.com> Date: Mon, 15 Jun 2026 17:15:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entity.go | 6 +++--- short_url.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/entity.go b/entity.go index 6250e36..20acd2d 100644 --- a/entity.go +++ b/entity.go @@ -24,10 +24,10 @@ type ShortUrlBatchCreate struct { type ShortUrlBatchCreateResult struct { Id int32 `json:"id"` // 名称 - BatchName string `json:"batch_name"` + BatchName string `json:"batchName"` // 批次号 - BatchNo int64 `json:"batch_no"` - UrlMap map[string]string `json:"url_map,omitempty"` + BatchNo string `json:"batchNo"` + UrlMap map[string]string `json:"urlMap,omitempty"` } type ShortUrlCreateReq struct { diff --git a/short_url.go b/short_url.go index 6127d7f..7d71a5d 100644 --- a/short_url.go +++ b/short_url.go @@ -57,12 +57,12 @@ func (s *ShortUrl) BatchCreate(in *ShortUrlBatchCreate) (*ShortUrlBatchCreateRes if err != nil { return nil, fmt.Errorf("请求失败,err: %v", err) } - var resData ShortUrlBatchCreateResult - err = CheckHttpRes(&resp, &resData) + var resData = &ShortUrlBatchCreateResult{} + err = CheckHttpRes(&resp, resData) if err != nil { return nil, err } - return &resData, nil + return resData, nil } func (s *ShortUrl) BatchQuery(in *BatchQueryReq) (*QueryBatchWithUrlResp, error) {