This commit is contained in:
邹宗楠
2025-08-11 09:55:15 +08:00
parent eb385cfb90
commit 5c14110da0
4 changed files with 26 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ import (
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/business/partner/purchase/mtwm"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/api"
"github.com/astaxie/beego/server/web"
"io/ioutil"
@@ -139,6 +140,21 @@ func (c *MtwmController) DeliveryFeeChange() {
c.onCallbackMsg(mtwmapi.MsgTypeOrderDeliveryFeeChange)
}
// Invoice 发票推送
func (c *MtwmController) Invoice() {
body, err := ioutil.ReadAll(c.Ctx.Request.Body)
if err != nil {
c.Data["json"] = mtwmapi.Err2CallbackResponse(err, "")
c.ServeJSON()
return
}
globals.SugarLogger.Debugf("------body:= %s", string(body))
callbackResponse := mtwmapi.Err2CallbackResponse(nil, "")
c.Data["json"] = callbackResponse
c.ServeJSON()
}
func (c *MtwmController) OnIMCallback() {
c.Data["json"] = mtwmapi.Err2CallbackResponse(nil, "")
msg, callbackResponse := api.MtwmAPI.GetIMCallbackMsg(c.Ctx.Request)