1
This commit is contained in:
@@ -107,15 +107,21 @@ func AutoSettingFakeDelivery() {
|
||||
// 1.根据订单客户地址获取骑手列表
|
||||
riderKey := ""
|
||||
storeDetail, _ := dao.GetStoreDetail(db, utils.Str2Int(storeIdAndVendorId[0]), 0, "")
|
||||
place, err := dao.GetParentCodeByCode(db, storeDetail.CityCode)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("根据门店的城市code获取省份code错误: %s", err)
|
||||
return
|
||||
}
|
||||
if strings.Contains(place.Name, "省") {
|
||||
riderKey = strings.Split(place.Name, "省")[0]
|
||||
if strings.Contains(storeDetail.Address, "重庆") || strings.Contains(storeDetail.Address, "上海") || strings.Contains(storeDetail.Address, "北京") || strings.Contains(storeDetail.Address, "天津") {
|
||||
riderKey = strings.Split(storeDetail.Address, "市")[0]
|
||||
} else if strings.Contains(storeDetail.Address, "省") {
|
||||
riderKey = strings.Split(storeDetail.Address, "省")[0]
|
||||
} else {
|
||||
riderKey = strings.Split(place.Name, "市")[0]
|
||||
place, err := dao.GetParentCodeByCode(db, storeDetail.CityCode)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("根据门店的城市code获取省份code错误: %s", err)
|
||||
return
|
||||
}
|
||||
if strings.Contains(place.Name, "省") {
|
||||
riderKey = strings.Split(place.Name, "省")[0]
|
||||
} else {
|
||||
riderKey = strings.Split(place.Name, "市")[0]
|
||||
}
|
||||
}
|
||||
|
||||
for _, v := range orderList {
|
||||
|
||||
Reference in New Issue
Block a user