- timer task shceuled to order goroutine to avoid concurrent problem.
This commit is contained in:
@@ -36,7 +36,7 @@ func init() {
|
||||
}
|
||||
|
||||
func (c *OrderController) OnOrderMsg(msg *jdapi.CallbackOrderMsg) (retVal *jdapi.CallbackResponse) {
|
||||
controller.CallMsgHandler(func() {
|
||||
jxutils.CallMsgHandler(func() {
|
||||
retVal = c.onOrderMsg(msg)
|
||||
}, jxutils.ComposeUniversalOrderID(msg.BillID, model.VendorIDJD))
|
||||
return retVal
|
||||
|
||||
@@ -13,7 +13,7 @@ type WaybillController struct {
|
||||
}
|
||||
|
||||
func (c *WaybillController) OnWaybillMsg(msg *jdapi.CallbackDeliveryStatusMsg) (retVal *jdapi.CallbackResponse) {
|
||||
controller.CallMsgHandler(func() {
|
||||
jxutils.CallMsgHandler(func() {
|
||||
retVal = c.onWaybillMsg(msg)
|
||||
}, jxutils.ComposeUniversalOrderID(msg.OrderID, model.VendorIDJD))
|
||||
return retVal
|
||||
|
||||
Reference in New Issue
Block a user