aa
This commit is contained in:
@@ -71,7 +71,7 @@ func (l OrderSkuList) Swap(i, j int) {
|
||||
|
||||
func init() {
|
||||
rand.Seed(time.Now().Unix())
|
||||
routinePool = routinepool.New(1000, 1000)
|
||||
routinePool = routinepool.New(2000, 2000)
|
||||
|
||||
// Go regex does not support lookarounds.
|
||||
// https://stackoverflow.com/questions/38933898/error-parsing-regexp-invalid-or-unsupported-perl-syntax
|
||||
@@ -217,8 +217,9 @@ func GetPossibleVendorIDFromAfsOrderID(afsOrderID string) (vendorID int) {
|
||||
}
|
||||
|
||||
func ComposeUniversalOrderID(orderID string, vendorID int) string {
|
||||
return fmt.Sprintf("%s|%d", orderID, vendorID)
|
||||
// return fmt.Sprintf("%s|%d", orderID, vendorID)
|
||||
// return orderID // 当前用长度就能区分,先不加上vendorID
|
||||
return orderID + utils.Int64ToStr(time.Now().Unix())
|
||||
}
|
||||
|
||||
func GetUniversalOrderIDFromWaybill(bill *model.Waybill) string {
|
||||
|
||||
@@ -60,15 +60,15 @@ var (
|
||||
)
|
||||
|
||||
func (c *PurchaseHandler) OnOrderMsg(a *jdapi.API, msg *jdapi.CallbackOrderMsg) (retVal *jdapi.CallbackResponse) {
|
||||
primaryID := msg.BillID
|
||||
if code, err := dao.GetVendorOrgCodeByKey(dao.GetDB(), model.VendorIDJD, a.GetAppKey()); err == nil && code != nil {
|
||||
primaryID += code.VendorOrgCode
|
||||
}
|
||||
// primaryID := msg.BillID
|
||||
// if code, err := dao.GetVendorOrgCodeByKey(dao.GetDB(), model.VendorIDJD, a.GetAppKey()); err == nil && code != nil {
|
||||
// primaryID += code.VendorOrgCode
|
||||
// }
|
||||
// primaryID += msg.BillID
|
||||
jxutils.CallMsgHandler(func() {
|
||||
globals.SugarLogger.Debugf("jd deliverOrder 3.7 ")
|
||||
retVal = c.onOrderMsg(a, msg)
|
||||
}, primaryID)
|
||||
}, jxutils.ComposeUniversalOrderID(msg.BillID, model.VendorIDJD))
|
||||
return retVal
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user