From e3edf0b1e443b359ac3ea36ac1de7f21f49a8d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Tue, 23 Mar 2021 14:13:42 +0800 Subject: [PATCH] Update RebateService.php --- app/data/service/RebateService.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/data/service/RebateService.php b/app/data/service/RebateService.php index d22a34627..9adda4292 100644 --- a/app/data/service/RebateService.php +++ b/app/data/service/RebateService.php @@ -203,9 +203,9 @@ class RebateService extends Service $key = "{$this->user['id']}"; $map = ['type' => self::PRIZE_03, 'order_no' => $this->order['order_no'], 'order_uid' => $this->order['uid']]; if ($this->config("direct_state_vip_{$key}") && $this->app->db->name($this->table)->where($map)->count() < 1) { - $value = $this->config("direct_value_vip_{$key}"); - $name = "{$this->name(self::PRIZE_03)},订单 {$value}%"; - $amount = floatval($value * $this->order['rebate_amount'] / 100); + $rate = $this->config("direct_value_vip_{$key}"); + $name = "{$this->name(self::PRIZE_03)},订单 {$rate}%"; + $amount = floatval($rate * $this->order['rebate_amount'] / 100); // 写入返利记录 $this->addRebateRecord($this->from1['id'], $map, $name, $amount); } @@ -226,9 +226,9 @@ class RebateService extends Service $key = "{$this->user['id']}"; $map = ['type' => self::PRIZE_04, 'order_no' => $this->order['order_no'], 'order_uid' => $this->order['uid']]; if ($this->config("indirect_state_vip_{$key}") && $this->app->db->name($this->table)->where($map)->count() < 1) { - $value = $this->config("indirect_value_vip_{$key}"); - $name = "{$this->name(self::PRIZE_04)},订单 {$value}%"; - $amount = floatval($value * $this->order['rebate_amount'] / 100); + $rate = $this->config("indirect_value_vip_{$key}"); + $name = "{$this->name(self::PRIZE_04)},订单 {$rate}%"; + $amount = floatval($rate * $this->order['rebate_amount'] / 100); // 写入返利记录 $this->addRebateRecord($this->from2['id'], $map, $name, $amount); }