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))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ func (c *BaseScheduler) CreateWaybillOnProviders(ctx *jxcontext.Context, order *
|
||||
// 创建运单
|
||||
bill, err2 := c.CreateWaybill(courierVendorID, order, maxDeliveryFee)
|
||||
if err = err2; err == nil {
|
||||
bill.DesiredFee += model.WayBillDeliveryMarkUp
|
||||
bill.ActualFee += model.WayBillDeliveryMarkUp
|
||||
bills = append(bills, bill)
|
||||
if createOnlyOne {
|
||||
break
|
||||
|
||||
@@ -81,7 +81,7 @@ func (s *DefScheduler) SelfDeliveringAndUpdateStatus(ctx *jxcontext.Context, ven
|
||||
}
|
||||
|
||||
// 上面是真的转自送,支持美团,饿百,京东,如果时抖店,抖店暂时全部是自送的!但是有骑手信息时,就是一个白嫖单子!
|
||||
if (order.VendorID == model.VendorIDDD || order.VendorID == model.VendorIDEBAI) && courierName != "" && courierMobile != "" && err == nil {
|
||||
if courierName != "" && courierMobile != "" && err == nil {
|
||||
timeNow := time.Now()
|
||||
rand.Seed(timeNow.UnixNano())
|
||||
randNumber := rand.Int63n(640)
|
||||
@@ -108,7 +108,7 @@ func (s *DefScheduler) SelfDeliveringAndUpdateStatus(ctx *jxcontext.Context, ven
|
||||
WaybillFinishedAt: utils.DefaultTimeValue,
|
||||
StatusTime: timeNow.Add(randTime), // 下一状态时间
|
||||
OriginalData: "",
|
||||
Remark: "自定义物流单(抖音/饿了么)",
|
||||
Remark: "自定义物流单(全平台刷单)",
|
||||
VendorOrgCode: order.VendorOrgCode,
|
||||
}
|
||||
err = dao.CreateEntity(dao.GetDB(), bill)
|
||||
@@ -524,6 +524,7 @@ func (s *DefScheduler) QueryOrderWaybillFeeInfoEx(ctx *jxcontext.Context, vendor
|
||||
ErrStr: err.Error(),
|
||||
}
|
||||
} else {
|
||||
feeInfo.DeliveryFee += model.WayBillDeliveryMarkUp // 加收两毛
|
||||
feeInfo.TimeoutSecond = timeoutSecond
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user