- change all vender to vendor.
This commit is contained in:
@@ -7,11 +7,11 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
JD_VENDERID = 0
|
||||
ELM_VENDERID = 2
|
||||
JD_VENDORID = 0
|
||||
ELM_VENDORID = 2
|
||||
)
|
||||
|
||||
func OnNewOrder(orderID string, venderID int, userMobile string, jxStoreID int, db orm.Ormer, handler func(accepted bool)) int {
|
||||
func OnNewOrder(orderID string, vendorID int, userMobile string, jxStoreID int, db orm.Ormer, handler func(accepted bool)) int {
|
||||
handleType := 0
|
||||
if userMobile != "" {
|
||||
if db == nil {
|
||||
@@ -22,17 +22,17 @@ func OnNewOrder(orderID string, venderID int, userMobile string, jxStoreID int,
|
||||
}
|
||||
if err := db.Read(user, "Mobile"); err != nil {
|
||||
if err != orm.ErrNoRows {
|
||||
globals.SugarLogger.Errorf("read data error:%v, data:%v, venderID:%d", err, user, venderID)
|
||||
globals.SugarLogger.Errorf("read data error:%v, data:%v, vendorID:%d", err, user, vendorID)
|
||||
}
|
||||
// 在访问数据库出错的情况下,也需要自动接单
|
||||
handleType = 1
|
||||
} else {
|
||||
// 强制拒单
|
||||
globals.SugarLogger.Infof("force reject order:%s, venderID:%d", orderID, venderID)
|
||||
globals.SugarLogger.Infof("force reject order:%s, vendorID:%d", orderID, vendorID)
|
||||
handleType = -1
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Infof("order:%s, venderID:%d, mobile is empty, should accept it", orderID, venderID)
|
||||
globals.SugarLogger.Infof("order:%s, vendorID:%d, mobile is empty, should accept it", orderID, vendorID)
|
||||
handleType = 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user