mirror of
				https://gitee.com/zoujingli/ThinkAdmin.git
				synced 2025-10-27 02:12:08 +08:00 
			
		
		
		
	Update RebateCurrentService.php
This commit is contained in:
		
							parent
							
								
									b6ac1db1e3
								
							
						
					
					
						commit
						967249ec9b
					
				| @ -126,7 +126,7 @@ class RebateCurrentService extends Service | |||||||
|                 $amount = $value ?: '0.00'; |                 $amount = $value ?: '0.00'; | ||||||
|                 $name = "{$this->name(self::PRIZE_01)},每人 {$amount} 元"; |                 $name = "{$this->name(self::PRIZE_01)},每人 {$amount} 元"; | ||||||
|             } else { |             } else { | ||||||
|                 $amount = $value * $this->order['amount_total'] / 100; |                 $amount = $value * $this->order['rebate_amount'] / 100; | ||||||
|                 $name = "{$this->name(self::PRIZE_01)},订单 {$value}%"; |                 $name = "{$this->name(self::PRIZE_01)},订单 {$value}%"; | ||||||
|             } |             } | ||||||
|             $this->app->db->name($this->table)->insert(array_merge($map, [ |             $this->app->db->name($this->table)->insert(array_merge($map, [ | ||||||
| @ -160,7 +160,7 @@ class RebateCurrentService extends Service | |||||||
|                 $amount = $value ?: '0.00'; |                 $amount = $value ?: '0.00'; | ||||||
|                 $name = "{$this->name(self::PRIZE_02)},每人 {$amount} 元"; |                 $name = "{$this->name(self::PRIZE_02)},每人 {$amount} 元"; | ||||||
|             } else { |             } else { | ||||||
|                 $amount = $value * $this->order['amount_total'] / 100; |                 $amount = $value * $this->order['rebate_amount'] / 100; | ||||||
|                 $name = "{$this->name(self::PRIZE_02)},订单 {$value}%"; |                 $name = "{$this->name(self::PRIZE_02)},订单 {$value}%"; | ||||||
|             } |             } | ||||||
|             $this->app->db->name($this->table)->insert(array_merge($map, [ |             $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']]; |         $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) { |         if ($this->config("direct_state_vip_{$key}") && $this->app->db->name($this->table)->where($map)->count() < 1) { | ||||||
|             $value = $this->config("direct_value_vip_{$key}"); |             $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}%"; |             $name = "{$this->name(self::PRIZE_03)},订单 {$value}%"; | ||||||
|             $this->app->db->name($this->table)->insert(array_merge($map, [ |             $this->app->db->name($this->table)->insert(array_merge($map, [ | ||||||
|                 'uid' => $this->from1['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'], |                 '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']]; |         $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) { |         if ($this->config("indirect_state_vip_{$key}") && $this->app->db->name($this->table)->where($map)->count() < 1) { | ||||||
|             $value = $this->config("indirect_value_vip_{$key}"); |             $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}%"; |             $name = "{$this->name(self::PRIZE_04)},订单 {$value}%"; | ||||||
|             $this->app->db->name($this->table)->insert(array_merge($map, [ |             $this->app->db->name($this->table)->insert(array_merge($map, [ | ||||||
|                 'uid' => $this->from2['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'], |                 'uid' => $this->from2['id'], 'name' => $name, 'amount' => $amount, 'order_amount' => $this->order['amount_total'], | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user