This commit is contained in:
邹宗楠
2025-05-15 18:29:13 +08:00
parent 3c4a5c2cdc
commit 61e88ae6b9
2 changed files with 13 additions and 13 deletions

View File

@@ -239,7 +239,7 @@ func Init() {
"04:00:00",
})
// 每天更新美团-门店结算方式[结算给企业/结算给个人]
// 每天更新美团-门店结算方式[结算给企业/结算给个人](取消了平台运单的骑手计费)
ScheduleTimerFunc("LoadingStoreOrderSettleAmount", func() {
delivery.LoadingStoreOrderSettleAmount(0, 0, nil)
}, []string{

View File

@@ -634,18 +634,18 @@ func LoadingStoreOrderSettleAmount(startTime, endTime int64, jxStoreId []int) er
}
}
// 更新订单的配送信息
if so.TimingFee != 0 || so.DeliveryFee != 0 {
if so.TimingFee < 0 {
so.TimingFee = so.TimingFee * -1
}
if so.DeliveryFee < 0 {
so.DeliveryFee = so.DeliveryFee * -1
}
wayBillSql := `UPDATE waybill w SET w.desired_fee = ?,w.punctual_fee = ? WHERE w.vendor_order_id = ? AND w.vendor_waybill_id = ? `
if _, err := dao.ExecuteSQL(db, wayBillSql, []interface{}{so.DeliveryFee, so.TimingFee, so.OrderId, so.OrderId}...); err != nil {
globals.SugarLogger.Debugf("更新订单物流结算信息错误: %v", err)
}
}
//if so.TimingFee != 0 || so.DeliveryFee != 0 {
// if so.TimingFee < 0 {
// so.TimingFee = so.TimingFee * -1
// }
// if so.DeliveryFee < 0 {
// so.DeliveryFee = so.DeliveryFee * -1
// }
// wayBillSql := `UPDATE waybill w SET w.desired_fee = ?,w.punctual_fee = ? WHERE w.vendor_order_id = ? AND w.vendor_waybill_id = ? `
// if _, err := dao.ExecuteSQL(db, wayBillSql, []interface{}{so.DeliveryFee, so.TimingFee, so.OrderId, so.OrderId}...); err != nil {
// globals.SugarLogger.Debugf("更新订单物流结算信息错误: %v", err)
// }
//}
}