- 统一清理调用CallMsgHandlerAsync时的primaryID设置

- defsch中,自动接单调用OnOrderStatusChanged改为异步,防止死循环
This commit is contained in:
gazebo
2019-05-14 11:54:22 +08:00
parent 313b9ca19b
commit 135563ea4d
7 changed files with 21 additions and 24 deletions

View File

@@ -45,11 +45,9 @@ func (c *PurchaseHandler) isAfsMsg(msg *ebaiapi.CallbackMsg) bool {
}
func (c *PurchaseHandler) OnAfsOrderMsg(msg *ebaiapi.CallbackMsg) (retVal *ebaiapi.CallbackResponse) {
utils.CallFuncAsync(func() {
jxutils.CallMsgHandler(func() {
retVal = c.onAfsOrderMsg(msg)
}, jxutils.ComposeUniversalOrderID(GetOrderIDFromMsg(msg), model.VendorIDEBAI))
})
jxutils.CallMsgHandlerAsync(func() {
retVal = c.onAfsOrderMsg(msg)
}, jxutils.ComposeUniversalOrderID(GetOrderIDFromMsg(msg), model.VendorIDEBAI))
return retVal
}