This commit is contained in:
suyl
2021-08-17 11:00:04 +08:00
parent 9170b072d7
commit 3a3d1d2f4f

View File

@@ -4,7 +4,6 @@ import (
"net/http"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/api"
"github.com/astaxie/beego/server/web"
@@ -22,14 +21,15 @@ func (c *DingDingController) Msg() {
globals.SugarLogger.Debugf("dingding msg:%s", string(c.Ctx.Input.RequestBody))
if c.Ctx.Input.Method() == http.MethodPost {
dataMap := utils.URLValues2Map(c.Ctx.Request.Form)
obj, callbackResponse := api.DingDingAPI.GetCallbackMsg(dataMap, c.Ctx.Input.RequestBody)
if callbackResponse == nil {
globals.SugarLogger.Debugf("dingding msg, obj:%s", utils.Format4Output(obj, false))
callbackResponse = cms.OnDingDingMsg(dataMap)
if callbackResponse == nil {
callbackResponse = api.DingDingAPI.Err2CallbackResponse(nil)
}
}
_, callbackResponse := api.DingDingAPI.GetCallbackMsg(dataMap, c.Ctx.Input.RequestBody)
//if callbackResponse == nil {
// globals.SugarLogger.Debugf("dingding msg, obj:%s", utils.Format4Output(obj, false))
// callbackResponse = cms.OnDingDingMsg(dataMap)
// if callbackResponse == nil {
// callbackResponse = api.DingDingAPI.Err2CallbackResponse(nil)
// }
//}
callbackResponse = api.DingDingAPI.PackCallbackResult("success")
c.Data["json"] = callbackResponse
c.ServeJSON()
} else {