更新单元测试
This commit is contained in:
parent
ad7d7ea7db
commit
9a82fa034f
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue