1
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"math/big"
|
||||
"strings"
|
||||
@@ -18,7 +19,6 @@ func AutoSettingFakeDelivery() {
|
||||
db := dao.GetDB()
|
||||
// 查询需要刷单的门店
|
||||
configList, err := dao.QueryConfigs(db, "storeIdList", "AutoDelivery", "")
|
||||
globals.SugarLogger.Debugf("configList------------;%s", utils.Format4Output(configList, false))
|
||||
if err != nil {
|
||||
globals.SugarLogger.Errorf("抖音自动刷单获取刷单门店列表错误:%v", err)
|
||||
return
|
||||
@@ -30,7 +30,6 @@ func AutoSettingFakeDelivery() {
|
||||
|
||||
// 获取刷单门店订单
|
||||
orderList, err := dao.GetOrderListByStoreList(db, utils.StringSlice2Int64(strings.Split(configList[0].Value, ",")))
|
||||
globals.SugarLogger.Debugf("orderList------------;%s", utils.Format4Output(orderList, false))
|
||||
if err != nil {
|
||||
globals.SugarLogger.Errorf("获取门店刷单记录错误")
|
||||
return
|
||||
@@ -46,6 +45,14 @@ func AutoSettingFakeDelivery() {
|
||||
globals.SugarLogger.Errorf("自动获取骑手信息错误:[%v]", err)
|
||||
return
|
||||
}
|
||||
|
||||
// 自动拣货
|
||||
handler := partner.GetPurchaseOrderHandlerFromVendorID(v.VendorID)
|
||||
flag := model.IsOrderDeliveryByStore(v) || model.IsOrderDeliveryBySelf(v)
|
||||
if err := handler.PickupGoods(v, flag, jxcontext.AdminCtx.GetUserName()); err != nil {
|
||||
globals.SugarLogger.Errorf("自动拣货错误:[%v]", err)
|
||||
return
|
||||
}
|
||||
//自动发单
|
||||
if err := defsch.FixedScheduler.SelfDeliveringAndUpdateStatus(jxcontext.AdminCtx, v.VendorOrderID, v.VendorID, jxcontext.AdminCtx.GetUserName(), riderInfo.CourierName, riderInfo.CourierMobile); err != nil {
|
||||
globals.SugarLogger.Errorf("自动发货错误:[%v]", err)
|
||||
|
||||
Reference in New Issue
Block a user