package controllers import ( "git.rosy.net.cn/jx-callback/business/mtps/controller" "git.rosy.net.cn/jx-callback/globals/globals2" "github.com/astaxie/beego" ) // Operations about ELMOrder type MTPSOrderController struct { beego.Controller } func (c *MTPSOrderController) URLMapping() { c.Mapping("Status", c.Status) c.Mapping("Except", c.Except) } // @Title all msg // @Description create object // @Success 200 {string} models.Object.Id // @Failure 403 body is empty // @router /status [post] func (c *MTPSOrderController) Status() { obj, callbackResponse := globals2.MtpsAPI.GetOrderCallbackMsg(c.Ctx.Request) if callbackResponse == nil { cc := &controller.OrderController{} callbackResponse = cc.OrderStatusChanged(obj) } c.Data["json"] = callbackResponse c.ServeJSON() } // @Title all msg test // @Description create object // @Success 200 {string} models.Object.Id // @Failure 403 body is empty // @router /except [Post] func (c *MTPSOrderController) Except() { obj, callbackResponse := globals2.MtpsAPI.GetOrderExceptionCallbackMsg(c.Ctx.Request) if callbackResponse == nil { cc := &controller.OrderController{} callbackResponse = cc.OrderException(obj) } c.Data["json"] = callbackResponse c.ServeJSON() }