扣点减配送费

This commit is contained in:
苏尹岚
2020-09-18 16:00:50 +08:00
parent 1a105e761c
commit ec52d564cc

View File

@@ -1776,6 +1776,10 @@ func UpdateWaybillDesiredFee(ctx *jxcontext.Context, vendorOrderID string, desir
} else {
bill.DesiredFee = int64(desiredFee)
_, err = dao.UpdateEntity(db, bill, "DesiredFee")
if order.EarningType == model.EarningTypePoints {
order.NewEarningPrice = order.NewEarningPrice - int64(desiredFee)
_, err = dao.UpdateEntity(db, order, "NewEarningPrice")
}
}
return err
}