1
This commit is contained in:
@@ -90,6 +90,8 @@ func AutoSettingFakeDelivery() {
|
||||
return
|
||||
}
|
||||
|
||||
// todo 修改刷单门店配置 storeId-vendorId 指定刷单门店和平台 0京东/1美团/3饿了么/14抖音/99全部平台
|
||||
|
||||
// 获取刷单门店订单
|
||||
orderList, err := dao.GetOrderListByStoreList(db, utils.StringSlice2Int64(strings.Split(configList[0].Value, ",")))
|
||||
if err != nil {
|
||||
@@ -101,19 +103,26 @@ func AutoSettingFakeDelivery() {
|
||||
}
|
||||
|
||||
for _, v := range orderList {
|
||||
//jxutils.CallMsgHandler(func() {
|
||||
// 1.根据订单客户地址获取骑手列表
|
||||
riderKey := ""
|
||||
if strings.Contains(v.ConsigneeAddress, "重庆") || strings.Contains(v.ConsigneeAddress, "上海") || strings.Contains(v.ConsigneeAddress, "北京") {
|
||||
if strings.Contains(v.ConsigneeAddress, "重庆") || strings.Contains(v.ConsigneeAddress, "上海") || strings.Contains(v.ConsigneeAddress, "北京") || strings.Contains(v.ConsigneeAddress, "天津") {
|
||||
riderKey = strings.Split(v.ConsigneeAddress, "市")[0]
|
||||
} else if strings.Contains(v.ConsigneeAddress, "省") {
|
||||
riderKey = strings.Split(v.ConsigneeAddress, "省")[0]
|
||||
} else {
|
||||
storeDetail, _ := dao.GetStoreDetail(db, v.JxStoreID, 0, "")
|
||||
if strings.Contains(storeDetail.Address, "重庆") || strings.Contains(storeDetail.Address, "上海") || strings.Contains(storeDetail.Address, "北京") {
|
||||
if strings.Contains(storeDetail.Address, "重庆") || strings.Contains(storeDetail.Address, "上海") || strings.Contains(storeDetail.Address, "北京") || strings.Contains(storeDetail.Address, "天津") {
|
||||
riderKey = strings.Split(storeDetail.Address, "市")[0]
|
||||
} else {
|
||||
riderKey = strings.Split(storeDetail.Address, "省")[0]
|
||||
if riderKey == "" {
|
||||
place, err := dao.GetParentCodeByCode(db, storeDetail.CityCode)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("根据门店的城市code获取省份code错误: %s", err)
|
||||
return
|
||||
}
|
||||
riderKey = place.Name[0 : len(place.Name)-3]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +169,5 @@ func AutoSettingFakeDelivery() {
|
||||
break
|
||||
}
|
||||
}
|
||||
//}, jxutils.ComposeUniversalOrderID(v.VendorOrderID, model.VendorIDDD))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user