aa
This commit is contained in:
@@ -40,6 +40,14 @@ func GetAPI(appOrgCode string) (apiObj *jdapi.API) {
|
||||
return getAPI(appOrgCode)
|
||||
}
|
||||
|
||||
func GetAPIbyKey(appKey string) (apiObj *jdapi.API) {
|
||||
if code, err := dao.GetVendorOrgCodeByKey(dao.GetDB(), model.VendorIDJD, appKey); err == nil && code != nil {
|
||||
return jdapi.New(code.Token, code.AppKey, code.AppSecret)
|
||||
}
|
||||
globals.SugarLogger.Warnf("GetAPIbyKey appKey:%s get empty vendorOrgCode", appKey)
|
||||
return nil
|
||||
}
|
||||
|
||||
func AppKey2OrgCode(appKey string) (vendorOrgCode string) {
|
||||
// apiList := partner.CurAPIManager.GetAppOrgCodeList(model.VendorIDJD)
|
||||
// for _, v := range apiList {
|
||||
|
||||
Reference in New Issue
Block a user