diff --git a/business/partner/purchase/ebai/callback.go b/business/partner/purchase/ebai/callback.go index b3234c88d..0af4a941b 100644 --- a/business/partner/purchase/ebai/callback.go +++ b/business/partner/purchase/ebai/callback.go @@ -4,8 +4,12 @@ import ( "git.rosy.net.cn/baseapi/platformapi/ebaiapi" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxutils" + "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" + "git.rosy.net.cn/jx-callback/business/jxutils/netprinter" "git.rosy.net.cn/jx-callback/business/model" + "git.rosy.net.cn/jx-callback/business/model/dao" "git.rosy.net.cn/jx-callback/globals" + "git.rosy.net.cn/jx-callback/globals/api" ) func OnCallbackMsg(msg *ebaiapi.CallbackMsg) (response *ebaiapi.CallbackResponse) { @@ -29,6 +33,12 @@ func OnCallbackMsg(msg *ebaiapi.CallbackMsg) (response *ebaiapi.CallbackResponse response = CurPurchaseHandler.OnFinancialMsg(msg) } else if msg.Cmd == ebaiapi.CmdShopMsgPush { response = CurPurchaseHandler.onShopMsgPush(msg) + } else if msg.Cmd == ebaiapi.CmdShopUnbindMsg { + // 门店授权发生变化 17,失去授权 + vendorStoreID := msg.Body["shop_list"].([]*ebaiapi.EBaiShopList)[0].ShopID + storeDetail, _ := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreID, model.VendorIDEBAI, "") + _, err := netprinter.PrintStoreStatus(jxcontext.AdminCtx, storeDetail, model.VendorIDMTWM, -9) + response = api.EbaiAPI.Err2CallbackResponse(msg.Cmd, err, msg.Cmd) } } return response diff --git a/business/partner/purchase/mtwm/callback.go b/business/partner/purchase/mtwm/callback.go index 52fc6af18..356c4e1c2 100644 --- a/business/partner/purchase/mtwm/callback.go +++ b/business/partner/purchase/mtwm/callback.go @@ -20,7 +20,8 @@ func OnCallbackMsg(msg *mtwmapi.CallbackMsg) (response *mtwmapi.CallbackResponse // 门店授权发生变化 17,失去授权 vendorStoreID := msg.FormData.Get("app_poi_code") storeDetail, _ := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreID, model.VendorIDMTWM, "") - netprinter.PrintStoreStatus(jxcontext.AdminCtx, storeDetail, model.VendorIDMTWM, -9) + _, err := netprinter.PrintStoreStatus(jxcontext.AdminCtx, storeDetail, model.VendorIDMTWM, -9) + response = mtwmapi.Err2CallbackResponse(err, "") } else { if orderID := GetOrderIDFromMsg(msg); orderID != "" { jxutils.CallMsgHandler(func() {