BankController.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: tandunzhao
  5. * Date: 2017/12/6
  6. * Time: 下午7:13
  7. */
  8. namespace App\Http\Controllers\Channel\Finance;
  9. use App\Http\Controllers\Channel\Finance\Transformers\BankTransformer;
  10. use App\Modules\Finance\Services\BankService;
  11. use Illuminate\Http\Request;
  12. class BankController extends BaseController
  13. {
  14. /**
  15. * @apiDefine Finance 结算提现模块
  16. */
  17. /**
  18. * @apiVersion 1.0.0
  19. * @apiDescription 获取银行列表
  20. * @api {GET} banks 获取银行列表
  21. * @apiGroup Finance
  22. * @apiName banks
  23. * @apiSuccess {Number} id 姓名.
  24. * @apiSuccess {String} name 银行名称.
  25. * @apiSuccess {String} code 银行编号.
  26. * @apiSuccess {String} source 渠道支付来源.通联支付,连连支付
  27. * @apiSuccessExample {json} Success-Response:
  28. *
  29. * {
  30. * "code": 0,
  31. * "msg": "",
  32. * "data":[
  33. * {
  34. * "id": 1,
  35. * "name": "中国邮政储蓄银行",
  36. * "code": "100",
  37. * "source": "通连支付"
  38. * }
  39. * ]
  40. * }
  41. */
  42. function getBankList(Request $request)
  43. {
  44. //$channel_id = $this->getChannelId();
  45. //$channel_name = $this->getChannelName();
  46. //$banks = BankService::getBankList(ChannelService::getChannelBankSourceById($channel_id));
  47. $banks = BankService::getBankList(config('common.lianlianpay'));
  48. return response()->collection(new BankTransformer(), $banks);
  49. }
  50. }