aa'
This commit is contained in:
@@ -2,6 +2,7 @@ package dao
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -15,6 +16,10 @@ const (
|
|||||||
AfsOrderStatus = -1
|
AfsOrderStatus = -1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
regexpNumber = regexp.MustCompile(`^\d+$`)
|
||||||
|
)
|
||||||
|
|
||||||
type StoresOrderSaleInfo struct {
|
type StoresOrderSaleInfo struct {
|
||||||
StoreID int `orm:"column(store_id)" json:"storeID"`
|
StoreID int `orm:"column(store_id)" json:"storeID"`
|
||||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||||
@@ -860,7 +865,8 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
|
|||||||
} else {
|
} else {
|
||||||
// 如果搜索关键字可能为订单号,则当成订单号查询
|
// 如果搜索关键字可能为订单号,则当成订单号查询
|
||||||
if params["keyword"] != nil {
|
if params["keyword"] != nil {
|
||||||
if jxutils.GetPossibleVendorIDFromVendorOrderID(params["keyword"].(string)) > model.VendorIDUnknown {
|
keyword := params["keyword"].(string)
|
||||||
|
if jxutils.GetPossibleVendorIDFromVendorOrderID(keyword) > model.VendorIDUnknown && regexpNumber.MatchString(keyword) {
|
||||||
params["vendorOrderID"] = params["keyword"]
|
params["vendorOrderID"] = params["keyword"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user