GetBankcardGlobal.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /*
  3. * @Descripttion:
  4. * @version:
  5. * @Author: ewgof
  6. * @Date: 2022-04-07 14:16:38
  7. * @LastEditors: ewgof
  8. * @LastEditTime: 2022-04-16 15:25:01
  9. */
  10. namespace common\globals;
  11. use common\globals\BaseGlobal;
  12. use common\globals\GlobalInvoke;
  13. use common\models\common\AddonsInvoker;
  14. class GetBankcardGlobal extends BaseGlobal
  15. {
  16. /**
  17. * 获取银行卡列表
  18. * @param [type] $invokes
  19. * @param array $params
  20. * @return array
  21. */
  22. public function getBankcardList($invokes, $params = [])
  23. {
  24. foreach ($invokes as $invoke) {
  25. try {
  26. // 获取条件
  27. $list = $this->invoke($invoke['class'], $invoke['method'], $params);
  28. $is_success = $this->validateInvokeReturn($params['invoke_id'], $list);
  29. // 全局调用获取提现条件
  30. if (!$is_success) {
  31. throw new \Exception('结果数据格式校验未通过');
  32. }
  33. } catch (\Exception $e) {
  34. \Yii::error('全局调用(INVOKE_GET_BANKCARD_LIST)出错:' . $invoke['class'] . '->' . $invoke['method'] . ', errmsg:' . $e->getMessage() . ',file: ' . $e->getFile() . ', line: ' . $e->getLine());
  35. continue;
  36. }
  37. }
  38. return $list;
  39. }
  40. /**
  41. * 验证调用结果
  42. * @param [type] $return
  43. * @return boolean
  44. */
  45. protected function validateGetBankCard($return = null) : bool
  46. {
  47. return true;
  48. }
  49. }