diff --git a/app/data/service/RebateCurrentService.php b/app/data/service/RebateCurrentService.php index e06d835f3..41ca5db24 100644 --- a/app/data/service/RebateCurrentService.php +++ b/app/data/service/RebateCurrentService.php @@ -126,7 +126,7 @@ class RebateCurrentService extends Service $amount = $value ?: '0.00'; $name = "{$this->name(self::PRIZE_01)},每人 {$amount} 元"; } else { - $amount = $value * $this->order['amount_total'] / 100; + $amount = $value * $this->order['rebate_amount'] / 100; $name = "{$this->name(self::PRIZE_01)},订单 {$value}%"; } $this->app->db->name($this->table)->insert(array_merge($map, [ @@ -160,7 +160,7 @@ class RebateCurrentService extends Service $amount = $value ?: '0.00'; $name = "{$this->name(self::PRIZE_02)},每人 {$amount} 元"; } else { - $amount = $value * $this->order['amount_total'] / 100; + $amount = $value * $this->order['rebate_amount'] / 100; $name = "{$this->name(self::PRIZE_02)},订单 {$value}%"; } $this->app->db->name($this->table)->insert(array_merge($map, [ @@ -188,7 +188,7 @@ class RebateCurrentService extends Service $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}"); - $amount = $value * $this->order['amount_total'] / 100; + $amount = $value * $this->order['rebate_amount'] / 100; $name = "{$this->name(self::PRIZE_03)},订单 {$value}%"; $this->app->db->name($this->table)->insert(array_merge($map, [ 'uid' => $this->from1['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'], @@ -214,7 +214,7 @@ class RebateCurrentService extends Service $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}"); - $amount = $value * $this->order['amount_total'] / 100; + $amount = $value * $this->order['rebate_amount'] / 100; $name = "{$this->name(self::PRIZE_04)},订单 {$value}%"; $this->app->db->name($this->table)->insert(array_merge($map, [ 'uid' => $this->from2['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'],