修改补贴金额

This commit is contained in:
luofei 2024-03-07 13:49:34 +08:00
parent 2bad727408
commit 75cf794b46

View File

@ -33,6 +33,7 @@ class OrderDeliveryListen implements ListenerInterface
$consumption = StoreConsumption::where('type', StoreConsumption::TYPE_RECHARGE)->find(); $consumption = StoreConsumption::where('type', StoreConsumption::TYPE_RECHARGE)->find();
$repo->startTime = date('Y-m-d H:i:s'); $repo->startTime = date('Y-m-d H:i:s');
$repo->endTime = '2025-07-01'; $repo->endTime = '2025-07-01';
$consumptionTotal = min($consumptionTotal, 100000);
$rate = $this->getRate($consumptionTotal); $rate = $this->getRate($consumptionTotal);
$repo->send($consumption, $rate, $order['uid'], $order['group_order_id'], $consumptionTotal, StoreConsumptionUser::STATUS_REPEAL, StoreConsumptionUser::TYPE_TWO); $repo->send($consumption, $rate, $order['uid'], $order['group_order_id'], $consumptionTotal, StoreConsumptionUser::STATUS_REPEAL, StoreConsumptionUser::TYPE_TWO);
} }
@ -40,7 +41,6 @@ class OrderDeliveryListen implements ListenerInterface
public function getRate($orderAmount) public function getRate($orderAmount)
{ {
$orderAmount = min($orderAmount, 100000);
if ($orderAmount >= 1000 && $orderAmount < 5000) { if ($orderAmount >= 1000 && $orderAmount < 5000) {
$rate = 0.05; $rate = 0.05;
} elseif ($orderAmount >= 5000 && $orderAmount < 10000) { } elseif ($orderAmount >= 5000 && $orderAmount < 10000) {