26 lines
657 B
Go
26 lines
657 B
Go
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()
|
|
}
|