This commit is contained in:
邹宗楠
2023-12-04 15:12:03 +08:00
parent 8cc1ce339d
commit bde8bb0839

View File

@@ -24,6 +24,7 @@ func (c *DjswController) handleMsg(handler func(*jdapi.API, interface{}) *jdapi.
callbackMsg, mapData, callbackResponse := jdapi.GetCallbackMsg(getUsefulRequest(c.Ctx))
if callbackResponse == nil {
if jdAPI := jd.GetAPIbyKey(callbackMsg.AppKey); jdAPI != nil {
// 暂时不校验token
if callbackResponse = jdAPI.CheckCallbackValidation(mapData, callbackMsg.Sign); callbackResponse == nil {
callbackResponse = handler(jdAPI, callbackMsg.Param)
}
@@ -143,6 +144,7 @@ func (c *DjswController) SinglePromoteCreate() {
}
func (c *DjswController) StoreCrud() {
globals.SugarLogger.Debugf("======================")
if c.Ctx.Input.Method() == http.MethodPost {
callbackResponse := c.handleMsg(func(a *jdapi.API, obj interface{}) (callbackResponse *jdapi.CallbackResponse) {
callbackResponse = jd.OnStoreMsg(obj.(*jdapi.CallbackOrderMsg))