SiteAccount.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\adminapi\controller\site;
  12. use app\dict\site\SiteAccountLogDict;
  13. use app\service\admin\site\SiteAccountLogService;
  14. use core\base\BaseAdminController;
  15. use think\Response;
  16. class SiteAccount extends BaseAdminController
  17. {
  18. /**
  19. * 账单列表
  20. * @return Response
  21. */
  22. public function lists()
  23. {
  24. $data = $this->request->params([
  25. ['type', ''],
  26. ['trade_no', ''],
  27. ['create_time', []],
  28. ]);
  29. return success((new SiteAccountLogService())->getPage($data));
  30. }
  31. /**
  32. * 账单详情
  33. * @param int $id
  34. * @return Response
  35. */
  36. public function info(int $id)
  37. {
  38. return success((new SiteAccountLogService())->getInfo($id));
  39. }
  40. /**
  41. * 累计账单
  42. */
  43. public function stat()
  44. {
  45. return success((new SiteAccountLogService())->stat());
  46. }
  47. public function accountType()
  48. {
  49. return success(SiteAccountLogDict::getType());
  50. }
  51. }