This commit is contained in:
苏尹岚
2021-02-03 10:15:53 +08:00
parent bde302b557
commit aaadd0ed32
8 changed files with 107 additions and 87 deletions

View File

@@ -29,7 +29,7 @@ type PurchaseHandler struct {
}
func init() {
if api.MtwmAPI != nil {
if api.MtwmAPI != nil || api.Mtwm2API != nil {
CurPurchaseHandler = New()
partner.RegisterPurchasePlatform(CurPurchaseHandler)
}
@@ -223,3 +223,10 @@ func (p *PurchaseHandler) getUploadImgPoiCode() (poiCode string) {
}
return poiCode
}
func getAPI(appOrgCode string) (apiObj *mtwmapi.API) {
if appOrgCode == "" {
globals.SugarLogger.Warnf("getAPI appOrgCode is empty")
}
return partner.CurAPIManager.GetAPI(model.VendorIDMTWM, appOrgCode).(*mtwmapi.API)
}