1
This commit is contained in:
@@ -4,8 +4,12 @@ import (
|
|||||||
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
|
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"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"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
func OnCallbackMsg(msg *ebaiapi.CallbackMsg) (response *ebaiapi.CallbackResponse) {
|
func OnCallbackMsg(msg *ebaiapi.CallbackMsg) (response *ebaiapi.CallbackResponse) {
|
||||||
@@ -29,6 +33,12 @@ func OnCallbackMsg(msg *ebaiapi.CallbackMsg) (response *ebaiapi.CallbackResponse
|
|||||||
response = CurPurchaseHandler.OnFinancialMsg(msg)
|
response = CurPurchaseHandler.OnFinancialMsg(msg)
|
||||||
} else if msg.Cmd == ebaiapi.CmdShopMsgPush {
|
} else if msg.Cmd == ebaiapi.CmdShopMsgPush {
|
||||||
response = CurPurchaseHandler.onShopMsgPush(msg)
|
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
|
return response
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ func OnCallbackMsg(msg *mtwmapi.CallbackMsg) (response *mtwmapi.CallbackResponse
|
|||||||
// 门店授权发生变化 17,失去授权
|
// 门店授权发生变化 17,失去授权
|
||||||
vendorStoreID := msg.FormData.Get("app_poi_code")
|
vendorStoreID := msg.FormData.Get("app_poi_code")
|
||||||
storeDetail, _ := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreID, model.VendorIDMTWM, "")
|
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 {
|
} else {
|
||||||
if orderID := GetOrderIDFromMsg(msg); orderID != "" {
|
if orderID := GetOrderIDFromMsg(msg); orderID != "" {
|
||||||
jxutils.CallMsgHandler(func() {
|
jxutils.CallMsgHandler(func() {
|
||||||
|
|||||||
Reference in New Issue
Block a user