- dingding callback msg
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
package controllers
|
package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
"github.com/astaxie/beego"
|
"github.com/astaxie/beego"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -15,14 +19,16 @@ func init() {
|
|||||||
|
|
||||||
func (c *DingDingController) Msg() {
|
func (c *DingDingController) Msg() {
|
||||||
globals.SugarLogger.Debugf("dingding msg:%s", string(c.Ctx.Input.RequestBody))
|
globals.SugarLogger.Debugf("dingding msg:%s", string(c.Ctx.Input.RequestBody))
|
||||||
// if c.Ctx.Input.Method() == http.MethodPost {
|
if c.Ctx.Input.Method() == http.MethodPost {
|
||||||
// obj, callbackResponse := api.EbaiAPI.GetCallbackMsg(c.Ctx.Request)
|
dataMap := utils.URLValues2Map(c.Ctx.Request.Form)
|
||||||
// if callbackResponse == nil {
|
obj, callbackResponse := api.DingDingAPI.GetCallbackMsg(dataMap, c.Ctx.Input.RequestBody)
|
||||||
// callbackResponse = ebai.OnCallbackMsg(obj)
|
if callbackResponse == nil {
|
||||||
// }
|
globals.SugarLogger.Debugf("dingding msg, obj:%s", utils.Format4Output(obj, false))
|
||||||
// c.Data["json"] = callbackResponse
|
callbackResponse = api.DingDingAPI.Err2CallbackResponse(nil)
|
||||||
// c.ServeJSON()
|
}
|
||||||
// } else {
|
c.Data["json"] = callbackResponse
|
||||||
// c.Abort("404")
|
c.ServeJSON()
|
||||||
// }
|
} else {
|
||||||
|
c.Abort("404")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user