CapitalFlow.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace app\controller\admin\v1\finance;
  3. use app\controller\admin\AuthController;
  4. use app\services\system\CapitalFlowServices;
  5. use think\facade\App;
  6. class CapitalFlow extends AuthController
  7. {
  8. /**
  9. * @param App $app
  10. * @param CapitalFlowServices $services
  11. */
  12. public function __construct(App $app, CapitalFlowServices $services)
  13. {
  14. parent::__construct($app);
  15. $this->services = $services;
  16. }
  17. /**
  18. * 资金流水
  19. * @return mixed
  20. */
  21. public function getFlowList()
  22. {
  23. $where = $this->request->getMore([
  24. ['time', ''],
  25. ['trading_type', 0],
  26. ['keywords', ''],
  27. ['ids', ''],
  28. ['export', 0]
  29. ]);
  30. $date = $this->services->getFlowList($where);
  31. return app('json')->success($date);
  32. }
  33. /**
  34. * 资金流水备注
  35. * @param $id
  36. * @return mixed
  37. */
  38. public function setMark($id)
  39. {
  40. $data = $this->request->postMore([
  41. ['mark', '']
  42. ]);
  43. $this->services->setMark($id, $data);
  44. return app('json')->success('备注成功!');
  45. }
  46. /**
  47. * 账单记录
  48. * @return mixed
  49. */
  50. public function getFlowRecord()
  51. {
  52. $where = $this->request->getMore([
  53. ['type', 'day'],
  54. ['time', '']
  55. ]);
  56. $data = $this->services->getFlowRecord($where);
  57. return app('json')->success($data);
  58. }
  59. }