-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve workflows config and create metadata func (#13)
* feat: create recharge and create merchant relation and create,modify,query store * feat: improve workflows config * feat: improve code workflows config
- Loading branch information
Showing
5 changed files
with
188 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,5 @@ | |
# vendor/ | ||
|
||
*.log | ||
*_test.go | ||
*_test.go | ||
logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright ImDaDa-Go Author(https://houseme.github.io/imdada-go/). All Rights Reserved. | ||
* | ||
* This Source Code Form is subject to the terms of the Apache-2.0 License. | ||
* If a copy of the MIT was not distributed with this file, | ||
* You can obtain one at https://github.com/houseme/imdada-go. | ||
*/ | ||
|
||
package dada | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bytedance/sonic" | ||
|
||
"github.com/houseme/imdada-go/domain" | ||
) | ||
|
||
// QueryCity query city list | ||
// 获取城市信息列表 http://newopen.imdada.cn/#/development/file/cityList | ||
func (c *Client) QueryCity(ctx context.Context, req *domain.CityListQueryRequest) (resp *domain.CityListQueryResponse, err error) { | ||
if req == nil { | ||
c.request.Body = "" | ||
} else { | ||
if c.request.Body, err = sonic.MarshalString(req); err != nil { | ||
return nil, err | ||
} | ||
} | ||
c.log.CtxDebugf(ctx, "QueryCity request data: %s ", c.request.Body) | ||
if err = c.doRequest(ctx, cityCodeList); err != nil { | ||
return nil, err | ||
} | ||
c.log.CtxDebugf(ctx, "QueryCity response data: %s", string(c.response.Body())) | ||
if err = sonic.Unmarshal(c.response.Body(), &resp); err != nil { | ||
return nil, err | ||
} | ||
return | ||
} |