WithdrawController.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeshop100%开源免费商用商城系统
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | 商业版本务必购买商业授权,以免引起法律纠纷
  8. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  9. // | gitee下载:https://gitee.com/likeshop_gitee
  10. // | github下载:https://github.com/likeshop-github
  11. // | 访问官网:https://www.likeshop.cn
  12. // | 访问社区:https://home.likeshop.cn
  13. // | 访问手册:http://doc.likeshop.cn
  14. // | 微信公众号:likeshop技术社区
  15. // | likeshop团队 版权所有 拥有最终解释权
  16. // +----------------------------------------------------------------------
  17. // | author: likeshopTeam
  18. // +----------------------------------------------------------------------
  19. namespace app\adminapi\controller\withdraw;
  20. use app\adminapi\controller\BaseAdminController;
  21. use app\adminapi\logic\withdraw\WithdrawLogic;
  22. use app\adminapi\validate\withdraw\WithdrawValidate;
  23. /**
  24. * 提现控制器
  25. * Class WithdrawController
  26. * @package app\adminapi\controller
  27. */
  28. class WithdrawController extends BaseAdminController
  29. {
  30. /**
  31. * @notes 查看提现列表
  32. * @return \think\response\Json
  33. * @author Tab
  34. * @date 2021/8/6 19:34
  35. */
  36. public function lists()
  37. {
  38. return $this->dataLists();
  39. }
  40. /**
  41. * @notes 查看提现详情
  42. * @return \think\response\Json
  43. * @author Tab
  44. * @date 2021/8/6 20:32
  45. */
  46. public function detail()
  47. {
  48. $params = (new WithdrawValidate())->goCheck();
  49. $result = WithdrawLogic::detail($params);
  50. return $this->data($result);
  51. }
  52. /**
  53. * @notes 审核拒绝
  54. * @return \think\response\Json
  55. * @author Tab
  56. * @date 2021/8/9 9:58
  57. */
  58. public function refuse()
  59. {
  60. $params = (new WithdrawValidate())->post()->goCheck();
  61. $result = WithdrawLogic::refuse($params);
  62. if($result) {
  63. return $this->success('审核拒绝');
  64. }
  65. return $this->fail(WithdrawLogic::getError());
  66. }
  67. /**
  68. * @notes 审核通过
  69. * @return \think\response\Json
  70. * @author Tab
  71. * @date 2021/8/9 10:13
  72. */
  73. public function pass()
  74. {
  75. $params = (new WithdrawValidate())->post()->goCheck();
  76. $result = WithdrawLogic::pass($params);
  77. if($result) {
  78. return $this->success('审核通过');
  79. }
  80. return $this->fail(WithdrawLogic::getError());
  81. }
  82. /**
  83. * @notes 查询结果(提现至微信零钱)
  84. * @return \think\response\Json
  85. * @author Tab
  86. * @date 2021/8/9 14:09
  87. */
  88. public function search()
  89. {
  90. $params = (new WithdrawValidate())->goCheck();
  91. $result = WithdrawLogic::search($params);
  92. if($result === false) {
  93. return $this->fail(WithdrawLogic::getError());
  94. }
  95. return $this->success($result,[],1,1);
  96. }
  97. /**
  98. * @notes 转账成功
  99. * @return \think\response\Json
  100. * @author Tab
  101. * @date 2021/8/9 15:32
  102. */
  103. public function transferSuccess()
  104. {
  105. $params = (new WithdrawValidate())->post()->goCheck();
  106. $result = WithdrawLogic::transferSuccess($params);
  107. if($result) {
  108. return $this->success('转账成功');
  109. }
  110. return $this->fail(WithdrawLogic::getError());
  111. }
  112. /**
  113. * @notes 转账失败
  114. * @return \think\response\Json
  115. * @author Tab
  116. * @date 2021/8/9 16:02
  117. */
  118. public function transferFail()
  119. {
  120. $params = (new WithdrawValidate())->post()->goCheck();
  121. $result = WithdrawLogic::transferFail($params);
  122. if($result) {
  123. return $this->success('转账失败');
  124. }
  125. return $this->fail(WithdrawLogic::getError());
  126. }
  127. }