RefundController.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeadmin快速开发前后端分离管理后台(PHP版)
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
  8. // | github下载:https://github.com/likeshop-github/likeadmin
  9. // | 访问官网:https://www.likeadmin.cn
  10. // | likeadmin团队 版权所有 拥有最终解释权
  11. // +----------------------------------------------------------------------
  12. // | author: likeadminTeam
  13. // +----------------------------------------------------------------------
  14. namespace app\adminapi\controller\finance;
  15. use app\adminapi\controller\BaseAdminController;
  16. use app\adminapi\lists\finance\RefundLogLists;
  17. use app\adminapi\lists\finance\RefundRecordLists;
  18. use app\adminapi\logic\finance\RefundLogic;
  19. /**
  20. * 退款控制器
  21. * Class RefundController
  22. * @package app\adminapi\controller\finance
  23. */
  24. class RefundController extends BaseAdminController
  25. {
  26. /**
  27. * @notes 退还统计
  28. * @return \think\response\Json
  29. * @throws \think\db\exception\DataNotFoundException
  30. * @throws \think\db\exception\DbException
  31. * @throws \think\db\exception\ModelNotFoundException
  32. * @author 段誉
  33. * @date 2023/3/3 12:10
  34. */
  35. public function stat()
  36. {
  37. $result = RefundLogic::stat();
  38. return $this->success('', $result);
  39. }
  40. /**
  41. * @notes 退款记录
  42. * @return \think\response\Json
  43. * @author 段誉
  44. * @date 2023/3/1 9:47
  45. */
  46. public function record()
  47. {
  48. return $this->dataLists(new RefundRecordLists());
  49. }
  50. /**
  51. * @notes 退款日志
  52. * @return \think\response\Json
  53. * @author 段誉
  54. * @date 2023/3/1 9:47
  55. */
  56. public function log()
  57. {
  58. $recordId = $this->request->get('record_id', 0);
  59. $result = RefundLogic::refundLog($recordId);
  60. return $this->success('', $result);
  61. }
  62. }