mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update RebateService.php
This commit is contained in:
parent
5d837e0224
commit
e3edf0b1e4
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user