FlowStatistic.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\adminapi\controller\v1\statistic;
  12. use app\adminapi\controller\AuthController;
  13. use app\services\statistic\CapitalFlowServices;
  14. use think\facade\App;
  15. class FlowStatistic extends AuthController
  16. {
  17. /**
  18. * @param App $app
  19. * @param CapitalFlowServices $services
  20. */
  21. public function __construct(App $app, CapitalFlowServices $services)
  22. {
  23. parent::__construct($app);
  24. $this->services = $services;
  25. }
  26. /**
  27. * 资金流水
  28. * @return mixed
  29. */
  30. public function getFlowList()
  31. {
  32. $where = $this->request->getMore([
  33. ['time', ''],
  34. ['trading_type', 0],
  35. ['keywords', ''],
  36. ['ids', ''],
  37. ['export', 0]
  38. ]);
  39. $date = $this->services->getFlowList($where);
  40. return app('json')->success($date);
  41. }
  42. /**
  43. * 资金流水备注
  44. * @param $id
  45. * @return mixed
  46. */
  47. public function setMark($id)
  48. {
  49. $data = $this->request->postMore([
  50. ['mark', '']
  51. ]);
  52. $this->services->setMark($id, $data);
  53. return app('json')->success(100024);
  54. }
  55. /**
  56. * 账单记录
  57. * @return mixed
  58. */
  59. public function getFlowRecord()
  60. {
  61. $where = $this->request->getMore([
  62. ['type', 'day'],
  63. ['time', '']
  64. ]);
  65. $data = $this->services->getFlowRecord($where);
  66. return app('json')->success($data);
  67. }
  68. }