京东商城建店
This commit is contained in:
25
controllers/jds_callback.go
Normal file
25
controllers/jds_callback.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/mtwm"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
type JdsController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
func (c *JdsController) Msg(msgType string) {
|
||||
c.Data["json"] = mtwmapi.Err2CallbackResponse(nil, "")
|
||||
msg, callbackResponse := api.MtwmAPI.GetCallbackMsg(c.Ctx.Request)
|
||||
if callbackResponse == nil {
|
||||
callbackResponse = mtwm.OnCallbackMsg(msg)
|
||||
if callbackResponse == nil {
|
||||
callbackResponse = mtwmapi.Err2CallbackResponse(nil, "")
|
||||
}
|
||||
}
|
||||
c.Data["json"] = callbackResponse
|
||||
c.ServeJSON()
|
||||
}
|
||||
Reference in New Issue
Block a user