This commit is contained in:
邹宗楠
2022-10-22 22:45:36 +08:00
parent c862340c56
commit 2ed93fe209
66 changed files with 10 additions and 156 deletions

View File

@@ -11,8 +11,6 @@ import (
"strings"
"sync"
"git.rosy.net.cn/baseapi"
"git.rosy.net.cn/baseapi/platformapi"
"git.rosy.net.cn/baseapi/utils"
)
@@ -63,7 +61,6 @@ type payload struct {
}
func New(token, appKey, secret string, isProd bool, config ...*platformapi.APIConfig) *API {
// baseapi.SugarLogger.Debugf("token=%v, appKey=%v, secret=%v", token, appKey, secret)
curConfig := platformapi.DefAPIConfig
if len(config) > 0 {
curConfig = *config[0]
@@ -120,7 +117,6 @@ func (a *API) signParamsMap(mapData map[string]interface{}, prefix string) strin
sort.Strings(keyValues)
finalStr := prefix + strings.Join(keyValues, "") + a.secret
// baseapi.SugarLogger.Debugf("sign str:%v", finalStr)
return fmt.Sprintf("%X", md5.Sum([]byte(finalStr)))
}
@@ -180,7 +176,6 @@ func (a *API) AccessAPI(action string, params map[string]interface{}) (retVal *R
} else if code == "SERVER_ERROR" || code == "BIZ_SYSTEM_ERROR" || code == "BIZ_1006" || code == "BUSINESS_ERROR" {
return platformapi.ErrLevelRecoverableErr, newErr
} else {
baseapi.SugarLogger.Debugf("AccessAPI elmapi failed, payload:%v jsonResult1:%v", pl, jsonResult1)
return platformapi.ErrLevelCodeIsNotOK, newErr
}
})