回调打桩
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
package controllers
|
package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"git.rosy.net.cn/baseapi/platformapi/fnpsapi"
|
"git.rosy.net.cn/baseapi/platformapi/fnpsapi"
|
||||||
"git.rosy.net.cn/jx-callback/business/partner/delivery/fn"
|
"git.rosy.net.cn/jx-callback/business/partner/delivery/fn"
|
||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
"github.com/astaxie/beego/server/web"
|
"github.com/astaxie/beego/server/web"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type FnController struct {
|
type FnController struct {
|
||||||
@@ -13,8 +13,11 @@ type FnController struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *FnController) Msg() {
|
func (c *FnController) Msg() {
|
||||||
if c.Ctx.Input.Method() == http.MethodPost {
|
//if c.Ctx.Input.Method() == http.MethodPost {
|
||||||
|
fmt.Println("开始回调==========================")
|
||||||
msg, callbackResponse := api.FnAPI.GetChainstoreStatusNotify(c.Ctx.Request)
|
msg, callbackResponse := api.FnAPI.GetChainstoreStatusNotify(c.Ctx.Request)
|
||||||
|
fmt.Println("开始回调==========================msg", msg)
|
||||||
|
fmt.Println("开始回调==========================callbackResponse", callbackResponse)
|
||||||
if callbackResponse.Code != 1 {
|
if callbackResponse.Code != 1 {
|
||||||
c.Data["json"] = callbackResponse
|
c.Data["json"] = callbackResponse
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
@@ -41,7 +44,7 @@ func (c *FnController) Msg() {
|
|||||||
|
|
||||||
c.Data["json"] = callbackResponse
|
c.Data["json"] = callbackResponse
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
} else {
|
//} else {
|
||||||
c.Abort("404")
|
c.Abort("404")
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user