2024-04-30 18:30:05 +08:00
|
|
|
package third_platform_sdk
|
2024-05-04 16:57:40 +08:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
|
|
|
|
2024-05-13 23:18:54 +08:00
|
|
|
didiunion "gitee.com/chengdu-lenntc/third-platform-sdk/platform/didi-union"
|
2024-05-04 16:57:40 +08:00
|
|
|
elemeunion "gitee.com/chengdu-lenntc/third-platform-sdk/platform/eleme-union"
|
|
|
|
|
meituancsr "gitee.com/chengdu-lenntc/third-platform-sdk/platform/meituan-csr"
|
2024-06-22 21:13:13 +08:00
|
|
|
"gitee.com/chengdu-lenntc/third-platform-sdk/platform/meituan-media"
|
2024-05-04 16:57:40 +08:00
|
|
|
meituanunion "gitee.com/chengdu-lenntc/third-platform-sdk/platform/meituan-union"
|
2024-06-15 12:37:11 +08:00
|
|
|
t3_union "gitee.com/chengdu-lenntc/third-platform-sdk/platform/t3-union"
|
2024-05-04 16:57:40 +08:00
|
|
|
)
|
|
|
|
|
|
2024-05-19 21:44:00 +08:00
|
|
|
// Platform 第三方平台
|
|
|
|
|
const (
|
|
|
|
|
// PlatformElemeUnion 饿了么联盟
|
|
|
|
|
PlatformElemeUnion = "ele"
|
|
|
|
|
// PlatformMeituanCsr 美团分销联盟
|
|
|
|
|
PlatformMeituanCsr = "meituan_csr"
|
|
|
|
|
// PlatformMeituanUnion 美团联盟
|
|
|
|
|
PlatformMeituanUnion = "meituan_union"
|
|
|
|
|
// PlatformDidiUnion 滴滴联盟
|
|
|
|
|
PlatformDidiUnion = "didi_union"
|
2024-06-15 12:37:11 +08:00
|
|
|
// PlatformT3Union t3出行联盟
|
|
|
|
|
PlatformT3Union = "t3_union"
|
2024-06-22 20:52:23 +08:00
|
|
|
// PlatformMeituanMedia 美团-美天赚
|
|
|
|
|
PlatformMeituanMedia = "meituan_media"
|
2024-05-19 21:44:00 +08:00
|
|
|
)
|
|
|
|
|
|
2024-06-15 12:37:11 +08:00
|
|
|
// PlatformNameMap 平台名称
|
2024-05-24 17:12:29 +08:00
|
|
|
var PlatformNameMap = map[string]string{
|
|
|
|
|
PlatformElemeUnion: "饿了么联盟",
|
|
|
|
|
PlatformMeituanCsr: "美团分销联盟",
|
|
|
|
|
PlatformMeituanUnion: "美团联盟",
|
|
|
|
|
PlatformDidiUnion: "滴滴联盟",
|
2024-06-15 12:37:11 +08:00
|
|
|
PlatformT3Union: "t3联盟",
|
2024-06-22 20:52:23 +08:00
|
|
|
PlatformMeituanMedia: "美团-美天赚",
|
2024-05-24 17:12:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GetPlatformName 获取平台名称
|
|
|
|
|
func GetPlatformName(platform string) string {
|
|
|
|
|
return PlatformNameMap[platform]
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-04 16:57:40 +08:00
|
|
|
// NewElemeUnionApi 饿了么联盟
|
|
|
|
|
func NewElemeUnionApi(log logx.Logger, conf elemeunion.AuthConfig) elemeunion.ElemeUnionApi {
|
|
|
|
|
return elemeunion.NewApiClient(log, conf)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewMeituanCsrApi 美团分销联盟
|
|
|
|
|
func NewMeituanCsrApi(log logx.Logger, conf meituancsr.AuthConfig) meituancsr.MeituanCsrApi {
|
|
|
|
|
return meituancsr.NewApiClient(log, conf)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewMeituanUnionApi 美团联盟
|
|
|
|
|
func NewMeituanUnionApi(log logx.Logger, conf meituanunion.AuthConfig) meituanunion.MeituanUnionApi {
|
|
|
|
|
return meituanunion.NewApiClient(log, conf)
|
|
|
|
|
}
|
2024-05-13 23:18:54 +08:00
|
|
|
|
|
|
|
|
// NewDidiUnionApi 滴滴联盟
|
|
|
|
|
func NewDidiUnionApi(log logx.Logger, conf didiunion.AuthConfig) didiunion.DidiUnionApi {
|
|
|
|
|
return didiunion.NewApiClient(log, conf)
|
|
|
|
|
}
|
2024-06-15 12:37:11 +08:00
|
|
|
|
|
|
|
|
func NewT3UnionApi(log logx.Logger, conf t3_union.AuthConfig) t3_union.T3UnionApi {
|
|
|
|
|
return t3_union.NewApiClient(log, conf)
|
|
|
|
|
}
|
2024-06-22 20:52:23 +08:00
|
|
|
|
|
|
|
|
func NewMeituanMediaApi(log logx.Logger, conf meituan_media.AuthConfig) meituan_media.MeituanMediaApi {
|
|
|
|
|
return meituan_media.NewApiClient(log, conf)
|
|
|
|
|
}
|