1'
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
@@ -1846,12 +1847,10 @@ func GetAddressRiderInfo(db *DaoDB, address string, randNumber int64) (*CourierI
|
|||||||
param := []interface{}{time.Now().AddDate(-1, 0, 0), model.OrderStatusFinished, model.OrderDeliveryTypePlatform, "%" + fmt.Sprintf("%s", address) + "%", randNumber, 1}
|
param := []interface{}{time.Now().AddDate(-1, 0, 0), model.OrderStatusFinished, model.OrderDeliveryTypePlatform, "%" + fmt.Sprintf("%s", address) + "%", randNumber, 1}
|
||||||
|
|
||||||
courier := &CourierInfo{}
|
courier := &CourierInfo{}
|
||||||
if err := GetRow(db, courier, sql, param); err != nil {
|
err := GetRow(db, courier, sql, param)
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
if courier.CourierName == "" || courier.CourierMobile == "" || len(courier.CourierMobile) != 11 {
|
if (err != nil && strings.Contains(err.Error(), "no row found")) || courier.CourierName == "" || courier.CourierMobile == "" || len(courier.CourierMobile) != 11 {
|
||||||
info, err := GetAddressRiderInfo(db, address, randNumber+1)
|
info, err := GetAddressRiderInfo(db, address, randNumber-1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user