- ebai the format of order_id of some different msgs are different.

This commit is contained in:
gazebo
2018-10-15 10:59:12 +08:00
parent cb86fe8a29
commit fa42da1f25
3 changed files with 13 additions and 5 deletions

View File

@@ -2,12 +2,18 @@ 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 := msg.Body["order_id"].(string)
orderID := ""
if response.Cmd == ebaiapi.CmdOrderCreate {
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: