This commit is contained in:
邹宗楠
2026-07-14 14:26:57 +08:00
parent fd5e61b249
commit d76fce41ad
4 changed files with 17 additions and 36 deletions

View File

@@ -223,26 +223,22 @@ func pushMTWMOrder2GY(value url.Values, msgType string, serverType string) *mtwm
// ImgCheckOutCallback 针对返图订单,当实拍审核失败时,通过该消息通知三方重新修改实拍
// http://callback.jxc4.com//mtwm/imgCheckOutCallback
func (c *MtwmController) ImgCheckOutCallback() {
data, err := ioutil.ReadAll(c.Ctx.Request.Body)
if err != nil {
msg, callbackResponse := api.MtwmAPI.GetCallbackMsg(c.Ctx.Request)
if callbackResponse != nil {
c.Data["json"] = map[string]interface{}{"result_code": -1}
c.ServeJSON()
return
}
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "美团返图审核通知", fmt.Sprintf("美团返图审核:%s", string(data)))
globals.SugarLogger.Debugf("-----data := %s", string(data))
callback := &CheckBackParam{}
if err = json.Unmarshal(data, callback); err != nil {
globals.SugarLogger.Debugf("-----data := %s", string(data))
c.Data["json"] = map[string]interface{}{"result_code": -1}
c.ServeJSON()
return
}
globals.SugarLogger.Debugf("-----data := %s", utils.Format4Output(callback, false))
data := &CheckBackParam{}
utils.Map2StructByJson(utils.URLValues2Map(msg.FormData), data, false)
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "ImgCheckOutCallback", fmt.Sprintf("美团返图审核:%s", utils.Format4Output(data, false)))
globals.SugarLogger.Debugf("-----data := %s", utils.Format4Output(data, false))
c.Data["json"] = map[string]interface{}{"result_code": 1}
c.ServeJSON()
}
type CheckBackParam struct {
@@ -258,27 +254,22 @@ type CheckBackParam struct {
// OrderImgStatusCallback 针对强制返图订单,当订单返图就绪满足发配条件时,通过该消息通知三方是否可发配
// http://callback.jxc4.com//mtwm/orderImgStatusCallback
func (c *MtwmController) OrderImgStatusCallback() {
data, err := ioutil.ReadAll(c.Ctx.Request.Body)
if err != nil {
c.Data["json"] = map[string]interface{}{"result_code": -1}
c.ServeJSON()
return
}
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "美团返图发货通知", fmt.Sprintf("美团发货审核:%s", string(data)))
globals.SugarLogger.Debugf("-----data := %s", string(data))
callback := &CanSendDelivery{}
if err = json.Unmarshal(data, callback); err != nil {
globals.SugarLogger.Debugf("-----data := %s", string(data))
msg, callbackResponse := api.MtwmAPI.GetCallbackMsg(c.Ctx.Request)
if callbackResponse != nil {
c.Data["json"] = map[string]interface{}{"result_code": -1}
c.ServeJSON()
return
}
globals.SugarLogger.Debugf("-----data := %s", utils.Format4Output(callback, false))
data := &CanSendDelivery{}
utils.Map2StructByJson(utils.URLValues2Map(msg.FormData), data, false)
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "OrderImgStatusCallback", fmt.Sprintf("美团返图审核可发配:%s", utils.Format4Output(data, false)))
globals.SugarLogger.Debugf("-----data := %s", utils.Format4Output(data, false))
c.Data["json"] = map[string]interface{}{"result_code": 1}
c.ServeJSON()
}
type CanSendDelivery struct {