diff --git a/business/model/lakala.go b/business/model/lakala.go index c9af6b3f2..7a0995f20 100644 --- a/business/model/lakala.go +++ b/business/model/lakala.go @@ -172,7 +172,6 @@ type LakalaWithdrawal struct { func (o *LakalaWithdrawal) TableUnique() [][]string { return [][]string{ - []string{"MercId"}, []string{"DrawJnl"}, } } diff --git a/business/partner/purchase/ebai/order.go b/business/partner/purchase/ebai/order.go index 85230eff1..afcfc5291 100644 --- a/business/partner/purchase/ebai/order.go +++ b/business/partner/purchase/ebai/order.go @@ -612,6 +612,10 @@ func (c *PurchaseHandler) onOrderMsg(msg *ebaiapi.CallbackMsg) (retVal *ebaiapi. partner.CurOrderManager.UpdateOrderFields(order, []string{"TotalShopMoney", "PmSubsidyMoney"}) } } + if status.Status == model.OrderStatusFinished { + order.OrderFinishedAt = time.Now() + partner.CurOrderManager.UpdateOrderFields(order, []string{"OrderFinishedAt"}) + } } } err = partner.CurOrderManager.OnOrderStatusChanged(msg.Source, status) diff --git a/controllers/lakala.go b/controllers/lakala.go index 118687751..2ab2ad1b0 100644 --- a/controllers/lakala.go +++ b/controllers/lakala.go @@ -736,9 +736,9 @@ func (c *LaKaLaController) EwalletWithdrawQuery() { }) } -// SettleDrawPattern 提现结果查询 -// @Title 提现结果查询 -// @Description 提现结果查询 +// SettleDrawPattern 提款模式设置 +// @Title 提款模式设置 +// @Description 提款模式设置 // @Param token header string true "认证token" // @Param payload formData string true "json数据,lakala.SettleDrawPatternReq 对象" // @Success 200 {object} controllers.CallResult @@ -758,9 +758,9 @@ func (c *LaKaLaController) SettleDrawPattern() { }) } -// EwalletSettleQuery 提现结果查询 -// @Title 提现结果查询 -// @Description 提现结果查询 +// EwalletSettleQuery 提款模式查询 +// @Title 提款模式查询 +// @Description 提款模式查询 // @Param token header string true "认证token" // @Param merchantNo query string true "商户号" // @Param orgNo query string true "bmcp机构号" diff --git a/controllers/mtwm_callback.go b/controllers/mtwm_callback.go index c48e3de7a..69b8b8406 100644 --- a/controllers/mtwm_callback.go +++ b/controllers/mtwm_callback.go @@ -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)