- GetStatusDuplicatedCount
- 提前判断消息是否重复,防止一些事件在判断是否重复前已经超时
This commit is contained in:
@@ -42,6 +42,10 @@ func (c *PurchaseHandler) OnOrderMsg(msg *jdapi.CallbackOrderMsg) (retVal *jdapi
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) onOrderMsg(msg *jdapi.CallbackOrderMsg) (retVal *jdapi.CallbackResponse) {
|
||||
status := c.callbackMsg2Status(msg)
|
||||
if partner.CurOrderManager.GetStatusDuplicatedCount(status) > 0 {
|
||||
return nil
|
||||
}
|
||||
if msg.MsgURL == jdapi.CallbackMsgOrderAccounting {
|
||||
retVal = c.OnFinancialMsg(msg)
|
||||
} else if msg.MsgURL == jdapi.CallbackMsgAfterSaleBillStatus {
|
||||
@@ -53,7 +57,6 @@ func (c *PurchaseHandler) onOrderMsg(msg *jdapi.CallbackOrderMsg) (retVal *jdapi
|
||||
} else if jdapi.OrderStatusAdjust == msg.StatusID {
|
||||
retVal = c.onOrderAdjust(msg)
|
||||
} else {
|
||||
status := c.callbackMsg2Status(msg)
|
||||
if msg.StatusID == jdapi.OrderStatusAddComment || msg.StatusID == jdapi.OrderStatusModifyComment {
|
||||
utils.CallFuncAsync(func() {
|
||||
c.onOrderComment2(msg)
|
||||
|
||||
Reference in New Issue
Block a user