1'
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"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}
|
||||
|
||||
courier := &CourierInfo{}
|
||||
if err := GetRow(db, courier, sql, param); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err := GetRow(db, courier, sql, param)
|
||||
|
||||
if courier.CourierName == "" || courier.CourierMobile == "" || len(courier.CourierMobile) != 11 {
|
||||
info, err := GetAddressRiderInfo(db, address, randNumber+1)
|
||||
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)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user