1, # 'addons_name' => 'Agent', # 'render_setting' => [ # 'text' => '个人经销佣金满____元', # 'setting' => [ # ['type' => 'text', 'name' => 'personal_agent_commission', 'default_val' => 0], # ], # 'tips' => '' # ], # 'validate_invoke' => [ # 'class' => 'addons\Agent\common\globalFunc\withdrawal\Withdrawal', # 'method' => 'checkWithdrawLimit1' # ] # ], # [ # 'id' => 2, # 'addons_name' => 'Agent', # 'render_setting' => [ # 'text' => '个人经销佣金小于____元', # 'setting' => [ # ['type' => 'text', 'name' => 'personal_agent_lt__commission', 'default_val' => 0], # ], # 'tips' => '' # ], # 'validate_invoke' => [ # 'class' => 'addons\Agent\common\globalFunc\withdrawal\Withdrawal', # 'method' => 'checkWithdrawLimit2' # ] # ] # ]; ########################################################################################################## /** * 获取提现限制条件 * @param [type] $invokes * @param array $params * @return void */ public function getWithDrawLimitCond($invokes,$params=[]){ $withdral_cond_list = []; foreach ($invokes as $invoke) { try{ // 获取条件 $withdral_cond = $this->invoke($invoke['class'],$invoke['method'],$params); $is_success = $this->validateInvokeReturn($params['invoke_id'],$withdral_cond); // 全局调用获取提现条件 if($is_success){ $withdral_cond_list = array_merge($withdral_cond_list, $withdral_cond); }else{ throw new \Exception('结果数据格式校验未通过'); } }catch(\Exception $e){ \Yii::error('全局调用(INVOKE_GET_WITHDRAW_COND)出错:'.$invoke['class'].'->'.$invoke['method'].'msg:'.$e->getMessage()); continue; } } return $withdral_cond_list; } /** * 验证调用结果 * @param [type] $return * @return boolean */ protected function validateWithDrawLimitCond($return=null):bool{ return true; } }