添加平台名称定义
This commit is contained in:
parent
be0e8ba9c4
commit
27fb10b9f6
13
index.go
13
index.go
@ -21,6 +21,19 @@ const (
|
||||
PlatformDidiUnion = "didi_union"
|
||||
)
|
||||
|
||||
// 平台名称
|
||||
var PlatformNameMap = map[string]string{
|
||||
PlatformElemeUnion: "饿了么联盟",
|
||||
PlatformMeituanCsr: "美团分销联盟",
|
||||
PlatformMeituanUnion: "美团联盟",
|
||||
PlatformDidiUnion: "滴滴联盟",
|
||||
}
|
||||
|
||||
// GetPlatformName 获取平台名称
|
||||
func GetPlatformName(platform string) string {
|
||||
return PlatformNameMap[platform]
|
||||
}
|
||||
|
||||
// NewElemeUnionApi 饿了么联盟
|
||||
func NewElemeUnionApi(log logx.Logger, conf elemeunion.AuthConfig) elemeunion.ElemeUnionApi {
|
||||
return elemeunion.NewApiClient(log, conf)
|
||||
|
||||
@ -104,6 +104,7 @@ func (a *meituanUnionApiImpl) GetOrderBySinge(params GetOrderBySingeRequest) (*G
|
||||
request.Sign = a.Sign(util.StructToMap(request))
|
||||
queryArgs := util.StructToMap(request)
|
||||
req := &client.HttpRequest{Headers: a.client.Headers, QueryArgs: queryArgs}
|
||||
// todo:: 返回完整的原始数据
|
||||
response := new(GetOrderBySingeResponse)
|
||||
if err := a.client.HttpGet(GetOrderSinge, req, &client.HttpResponse{Result: response}); err != nil {
|
||||
return nil, err
|
||||
@ -125,6 +126,7 @@ func (a *meituanUnionApiImpl) GetOrderByBatch(params GetOrderByBatchRequest) (*G
|
||||
queryArgs := util.StructToMap(request)
|
||||
fmt.Printf("queryArgs: %+v\n", queryArgs)
|
||||
req := &client.HttpRequest{Headers: a.client.Headers, QueryArgs: queryArgs}
|
||||
// todo:: 返回完整的原始数据
|
||||
response := new(GetOrderByBatchResponse)
|
||||
if err := a.client.HttpGet(GetOrderBatch, req, &client.HttpResponse{Result: response}); err != nil {
|
||||
a.log.Errorf("GetOrderByBatch error: %v", err)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user