- fix bug len(phoneList) >= 1 in elm orderMessage.
This commit is contained in:
@@ -33,10 +33,10 @@ func (o *OrderController) OrderMessage(msg *elmapi.CallbackMsg) (retVal *elmapi.
|
||||
globals2.RoutinePool.CallFun(func() {
|
||||
if msg.Type == elmapi.MsgTypeOrderValid {
|
||||
userMobile := ""
|
||||
if phoneList, ok := innerMsg["phoneList"].([]interface{}); ok && len(phoneList) > 1 {
|
||||
if phoneList, ok := innerMsg["phoneList"].([]interface{}); ok && len(phoneList) >= 1 {
|
||||
userMobile = phoneList[0].(string)
|
||||
} else {
|
||||
baseapi.SugarLogger.Warnf("can not get mobile info from %v, error:%v", msg, err)
|
||||
baseapi.SugarLogger.Warnf("elm can not get mobile info from %v, error:%v", msg, err)
|
||||
}
|
||||
retVal = o.NewOrder(msg, orderID, userMobile)
|
||||
} else if msg.Type >= elmapi.MsgTypeMerchantValid && msg.Type <= elmapi.MsgTypeOrderFinished {
|
||||
|
||||
Reference in New Issue
Block a user