PayRefund.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的多应用管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\adminapi\controller\pay;
  12. use app\dict\pay\RefundDict;
  13. use app\service\admin\pay\RefundService;
  14. use core\base\BaseAdminController;
  15. class PayRefund extends BaseAdminController
  16. {
  17. /**
  18. * 退款列表
  19. * @return \think\Response
  20. */
  21. public function pages()
  22. {
  23. $data = $this->request->params([
  24. ['refund_no', ''],
  25. ['create_time', []],
  26. ['status', '']
  27. ]);
  28. return success(data: (new RefundService())->getPage($data));
  29. }
  30. /**
  31. * 退款详情
  32. * @param $refund_no
  33. * @return \think\Response
  34. */
  35. public function detail($refund_no)
  36. {
  37. return success(data: (new RefundService())->getDetail($refund_no));
  38. }
  39. /**
  40. * 获取退款方式
  41. */
  42. public function getRefundType()
  43. {
  44. return success(data:(new RefundDict())->getType());
  45. }
  46. /**
  47. * 转账
  48. * @return \think\Response
  49. */
  50. public function transfer()
  51. {
  52. $data = $this->request->params([
  53. ['refund_no', ''],
  54. ['refund_type', []],
  55. ['voucher', '']
  56. ]);
  57. return success(data:(new RefundService())->refund($data));
  58. }
  59. }