This commit is contained in:
邹宗楠
2023-03-03 20:04:59 +08:00
parent 7593f1ac9c
commit a560ffcb3b
2 changed files with 7 additions and 1 deletions

View File

@@ -121,7 +121,7 @@ func AutoSettingFakeDelivery() {
if randTime < 0 {
randTime = 1
}
if randTime > int64(len(riderListInfo[riderKey])) {
if randTime >= int64(len(riderListInfo[riderKey])) {
randTime = int64(len(riderListInfo[riderKey])) - 1
}
@@ -133,6 +133,9 @@ func AutoSettingFakeDelivery() {
return
}
//自动发单
if len(riderListInfo[riderKey]) == 0 {
globals.SugarLogger.Errorf("riderListInfo[riderKey][randTime] :%s,%s,%d", riderListInfo[riderKey][randTime], riderKey, randTime)
}
for riderName, riderPhone := range riderListInfo[riderKey][randTime] {
globals.SugarLogger.Debugf("SelfDeliveringAndUpdateStatus : %s", v.VendorOrderID)
if err := defsch.FixedScheduler.SelfDeliveringAndUpdateStatus(jxcontext.AdminCtx, v.VendorOrderID, v.VendorID, jxcontext.AdminCtx.GetUserName(), riderName, riderPhone); err != nil {

View File

@@ -339,6 +339,9 @@ func (c *BaseScheduler) CheckStoreBalanceWithTip(ctx *jxcontext.Context, order *
if tipFee > int64(storeAcct.AccountBalance) {
return model.ErrCodeAccountBalanceNotEnough, fmt.Errorf("门店账户余额不足,不能加小费!")
}
if tipFee >= 1000 {
return model.ErrCodeAccountBalanceNotEnough, fmt.Errorf("小费单子加价金额大于十元")
}
}
return errCode, err
}