1
This commit is contained in:
@@ -151,6 +151,8 @@ func (c *ApiController) CallOpenAPI() {
|
||||
delete(dataMap, keyTimestamp)
|
||||
delete(dataMap, keySign)
|
||||
parms = []reflect.Value{reflect.ValueOf(dataMap)}
|
||||
globals.SugarLogger.Debugf("=============dataMap := %s", utils.Format4Output(dataMap, false))
|
||||
globals.SugarLogger.Debugf("=============parms := %s", utils.Format4Output(parms, false))
|
||||
if routerMap[method] == reflect.ValueOf(nil) {
|
||||
errCode = model.ErrCodeOpenAPIParamErrMethod
|
||||
err = buildMethodParamErr()
|
||||
@@ -158,7 +160,9 @@ func (c *ApiController) CallOpenAPI() {
|
||||
}
|
||||
globals.SugarLogger.Debugf("Begin API CallOpenAPI Method: %s, accessUUID:%s, sign:%s, ip:%s\n", method, accessID, sign, getRealRemoteIP(c.Ctx.Request))
|
||||
if err == nil {
|
||||
globals.SugarLogger.Debugf("=============routerMap := %s", utils.Format4Output(routerMap, false))
|
||||
result = routerMap[method].Call(parms)
|
||||
globals.SugarLogger.Debugf("=============result := %s", utils.Format4Output(result, false))
|
||||
if result[2].Interface() != nil {
|
||||
err = result[2].Interface().(error)
|
||||
errCode = result[1].String()
|
||||
|
||||
Reference in New Issue
Block a user