- handle Jdorder code is only 2 characters.
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
MsgNotHandledCode = "9527"
|
||||
MsgNotHandledCode = "NH"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -98,15 +98,15 @@ func (c *OrderController) OrderStatus(order *jdapi.CallbackOrderMsg) *jdapi.Call
|
||||
OrderStatusTime: order.Timestamp,
|
||||
}
|
||||
|
||||
if created, _, err := db.ReadOrCreate(rec, "Jdorderid"); err == nil {
|
||||
if created, _, err := db.ReadOrCreate(rec, "JdOrderID"); err == nil {
|
||||
order.ID = rec.ID
|
||||
if created {
|
||||
if order.StatusID != jdapi.OrderStatusNew && order.StatusID != jdapi.OrderStatusAdjust {
|
||||
globals.SugarLogger.Warnf("order:%v get before create", order)
|
||||
oldStatusId := order.StatusID
|
||||
oldStatusID := order.StatusID
|
||||
order.StatusID = jdapi.OrderStatusNew
|
||||
addOrderMsg(order)
|
||||
order.StatusID = oldStatusId
|
||||
order.StatusID = oldStatusID
|
||||
}
|
||||
addOrderMsg(order)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user