aa
This commit is contained in:
@@ -226,6 +226,21 @@ func (p *PurchaseHandler) getUploadImgPoiCode() (poiCode string) {
|
||||
return poiCode
|
||||
}
|
||||
|
||||
func GetAPI(appOrgCode string, vendorStoreID string) (apiObj *mtwmapi.API) {
|
||||
if appOrgCode == "" {
|
||||
globals.SugarLogger.Debugf("getAPI appOrgCode is empty")
|
||||
}
|
||||
apiObj = partner.CurAPIManager.GetAPI(model.VendorIDMTWM, appOrgCode).(*mtwmapi.API)
|
||||
if appOrgCode == globals.Mtwm2Code {
|
||||
var storeDetail *dao.StoreDetail
|
||||
storeDetail, _ = dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreID, model.VendorIDMTWM, appOrgCode)
|
||||
if storeDetail != nil {
|
||||
apiObj.SetToken(storeDetail.MtwmToken)
|
||||
}
|
||||
}
|
||||
return apiObj
|
||||
}
|
||||
|
||||
func getAPI(appOrgCode string, storeID int, vendorStoreID string) (apiObj *mtwmapi.API) {
|
||||
if appOrgCode == "" {
|
||||
globals.SugarLogger.Debugf("getAPI appOrgCode is empty")
|
||||
|
||||
Reference in New Issue
Block a user