更新单元测试
This commit is contained in:
parent
ad7d7ea7db
commit
9a82fa034f
|
|
@ -24,10 +24,10 @@ type ShortUrlBatchCreate struct {
|
||||||
type ShortUrlBatchCreateResult struct {
|
type ShortUrlBatchCreateResult struct {
|
||||||
Id int32 `json:"id"`
|
Id int32 `json:"id"`
|
||||||
// 名称
|
// 名称
|
||||||
BatchName string `json:"batch_name"`
|
BatchName string `json:"batchName"`
|
||||||
// 批次号
|
// 批次号
|
||||||
BatchNo int64 `json:"batch_no"`
|
BatchNo string `json:"batchNo"`
|
||||||
UrlMap map[string]string `json:"url_map,omitempty"`
|
UrlMap map[string]string `json:"urlMap,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ShortUrlCreateReq struct {
|
type ShortUrlCreateReq struct {
|
||||||
|
|
|
||||||
|
|
@ -57,12 +57,12 @@ func (s *ShortUrl) BatchCreate(in *ShortUrlBatchCreate) (*ShortUrlBatchCreateRes
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("请求失败,err: %v", err)
|
return nil, fmt.Errorf("请求失败,err: %v", err)
|
||||||
}
|
}
|
||||||
var resData ShortUrlBatchCreateResult
|
var resData = &ShortUrlBatchCreateResult{}
|
||||||
err = CheckHttpRes(&resp, &resData)
|
err = CheckHttpRes(&resp, resData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return &resData, nil
|
return resData, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *ShortUrl) BatchQuery(in *BatchQueryReq) (*QueryBatchWithUrlResp, error) {
|
func (s *ShortUrl) BatchQuery(in *BatchQueryReq) (*QueryBatchWithUrlResp, error) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue