Files
jx-callback/business/partner/purchase/ebai/callback.go
gazebo f316fd4c1f - all ebai order msg order_id is tring
- if store_id of ebai order larger than math.MaxInt32, set it to zero
2018-11-13 15:53:43 +08:00

27 lines
880 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package ebai
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/model"
)
func OnCallbackMsg(msg *ebaiapi.CallbackMsg) (response *ebaiapi.CallbackResponse) {
orderID := ""
if true { //msg.Cmd == ebaiapi.CmdOrderCreate { // 与测试时情况不一样好像线上全改成string了
orderID = msg.Body["order_id"].(string)
} else {
orderID = utils.Int64ToStr(utils.MustInterface2Int64(msg.Body["order_id"]))
}
jxutils.CallMsgHandler(func() {
switch msg.Cmd {
case ebaiapi.CmdOrderCreate, ebaiapi.CmdOrderStatus:
response = curPurchaseHandler.onOrderMsg(msg)
case ebaiapi.CmdOrderDeliveryStatus:
response = curPurchaseHandler.onWaybillMsg(msg)
}
}, jxutils.ComposeUniversalOrderID(orderID, model.VendorIDEBAI))
return response
}