| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- /*
- * @Descripttion:
- * @version:
- * @Author: ewgof
- * @Date: 2022-04-07 14:16:38
- * @LastEditors: ewgof
- * @LastEditTime: 2022-04-16 15:25:01
- */
- namespace common\globals;
- use common\globals\BaseGlobal;
- use common\globals\GlobalInvoke;
- use common\models\common\AddonsInvoker;
- class DeleteBankcardGlobal extends BaseGlobal
- {
- /**
- * 获取银行卡详情
- * @param [type] $invokes
- * @param array $params
- * @return array
- */
- public function del($invokes, $params = [])
- {
- $list = [];
- foreach ($invokes as $invoke) {
- try {
- // 获取条件
- $res = $this->invoke($invoke['class'], $invoke['method'], $params);
- $is_success = $this->validateInvokeReturn($params['invoke_id'], $list);
- if(!empty($res['code']))throw new \Exception($res['msg']);
- $list = array_merge($list, $res);
- // 全局调用获取提现条件
- if (!$is_success) {
- throw new \Exception('结果数据格式校验未通过');
- }
- } catch (\Exception $e) {
- \Yii::error('全局调用(INVOKE_GET_BANKCARD_LIST)出错:' . $invoke['class'] . '->' . $invoke['method'] . ', errmsg:' . $e->getMessage() . ',file: ' . $e->getFile() . ', line: ' . $e->getLine());
- throw new \Exception($e->getMessage());
- continue;
- }
- }
- return $list;
- }
- /**
- * 验证调用结果
- * @param [type] $return
- * @return boolean
- */
- protected function validateDel($return = null): bool
- {
- return true;
- }
- }
|