| | |
| | | protected $pk = 'user_id'; |
| | | protected $name = 'user'; |
| | | |
| | | public static function getOperatingSubsidy($referee_id, $setting) |
| | | { |
| | | $count=self::where('referee_id',$referee_id)->where('grade_id','in',$setting['referee_grade_ids'])->count(); |
| | | if ($count>=$setting['referee_grade_count']){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 修改器 |
| | | */ |
| | |
| | | $quantity=0; |
| | | foreach ($product as $item){ |
| | | // 检查商品是否是指定的分红商品 |
| | | if (in_array($item['product_id'], $config['become__buy_product_ids'])) { |
| | | if (in_array($item['product_id'], $config['become__buy_product_ids'])||$item['is_vip']==1) { |
| | | // 获取商品数量 |
| | | $quantity+= $item['total_num']; |
| | | } |