mtwmapi与ebaiapi返回api id的函数
This commit is contained in:
@@ -102,7 +102,7 @@ func (a *API) Decrypt(msg string) (decryptedMsg string, err error) {
|
||||
if err = err2; err == nil {
|
||||
var msgLen int32
|
||||
if err = binary.Read(bytes.NewBuffer(binResult[16:]), binary.BigEndian, &msgLen); err == nil {
|
||||
baseapi.SugarLogger.Debug(msgLen)
|
||||
// baseapi.SugarLogger.Debug(msgLen)
|
||||
decryptedMsg = string(binResult[16+4 : 16+4+msgLen])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,10 @@ func (a *API) getShopID(body map[string]interface{}) (shopID string) {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (a *API) GetSource() string {
|
||||
return a.source
|
||||
}
|
||||
|
||||
func (a *API) AccessAPI2(cmd string, body map[string]interface{}, trackInfo string) (retVal *ResponseResult, err error) {
|
||||
baseapi.SugarLogger.Debugf("ebai AccessAPI cmd:%s", cmd)
|
||||
// a.speedLimiter.AccessAPI(allAPI)
|
||||
|
||||
@@ -111,6 +111,10 @@ func (a *API) signParams(signURL string, params map[string]interface{}) string {
|
||||
return fmt.Sprintf("%x", md5.Sum([]byte(finalStr)))
|
||||
}
|
||||
|
||||
func (a *API) GetAppID() string {
|
||||
return a.appID
|
||||
}
|
||||
|
||||
func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{}, resultKey, trackInfo string) (retVal interface{}, err error) {
|
||||
params := make(map[string]interface{})
|
||||
params["timestamp"] = time.Now().Unix()
|
||||
|
||||
Reference in New Issue
Block a user