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()
|
||||
|
||||
4
main.go
4
main.go
@@ -7,6 +7,8 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasks"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/controllers"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
@@ -54,6 +56,8 @@ func Init() {
|
||||
}
|
||||
cms.InitServiceInfo(Version, buildTime, GitCommit)
|
||||
misc.Init()
|
||||
controllers.Init()
|
||||
dao.Init()
|
||||
}
|
||||
|
||||
// 返回true表示非运行服务
|
||||
|
||||
Reference in New Issue
Block a user