Finance.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\merchant\controller\finance;
  12. use app\merchant\controller\AuthController;
  13. use service\JsonService as Json;
  14. use app\merchant\model\merchant\MerchantFlowingWater;
  15. use app\merchant\model\merchant\Merchant;
  16. use app\merchant\model\merchant\MerchantBill;
  17. use service\SystemConfigService;
  18. use service\FormBuilder as Form;
  19. use service\HookService;
  20. use think\Url;
  21. use app\merchant\model\user\User;
  22. use app\merchant\model\user\UserExtract;
  23. /**
  24. * 微信充值记录
  25. * Class Finance
  26. */
  27. class Finance extends AuthController
  28. {
  29. /**讲师流水
  30. * @return mixed
  31. * @throws \think\db\exception\DataNotFoundException
  32. * @throws \think\db\exception\ModelNotFoundException
  33. * @throws \think\exception\DbException
  34. */
  35. public function merbill()
  36. {
  37. return $this->fetch();
  38. }
  39. /**
  40. * 显示资金记录ajax列表
  41. */
  42. public function merbilllist()
  43. {
  44. $where = parent::getMore([
  45. ['start_time', ''],
  46. ['end_time', ''],
  47. ['limit', 20],
  48. ['page', 1],
  49. ['category', 'now_money'],
  50. ]);
  51. $where['mer_id'] = $this->merchantId;
  52. return Json::successlayui(MerchantBill::getBillList($where));
  53. }
  54. /**
  55. *保存资金监控的excel表格
  56. */
  57. public function save_mer_bell_export()
  58. {
  59. $where = parent::getMore([
  60. ['start_time', ''],
  61. ['end_time', ''],
  62. ['category', 'now_money'],
  63. ]);
  64. $where['mer_id'] = $this->merchantId;
  65. MerchantBill::SaveExport($where);
  66. }
  67. /**金币流水
  68. * @return mixed
  69. * @throws \think\db\exception\DataNotFoundException
  70. * @throws \think\db\exception\ModelNotFoundException
  71. * @throws \think\exception\DbException
  72. */
  73. public function mer_gold_bill()
  74. {
  75. return $this->fetch('mer_gold_bill');
  76. }
  77. /**订单分成
  78. * @return mixed
  79. * @throws \think\db\exception\DataNotFoundException
  80. * @throws \think\db\exception\ModelNotFoundException
  81. * @throws \think\exception\DbException
  82. */
  83. public function merOrderBill()
  84. {
  85. return $this->fetch('mer_order_bill');
  86. }
  87. /**
  88. * 订单分成列表
  89. */
  90. public function merOrderBillList()
  91. {
  92. $where = parent::getMore([
  93. ['start_time', ''],
  94. ['end_time', ''],
  95. ['nickname', ''],
  96. ['limit', 20],
  97. ['page', 1],
  98. ]);
  99. $where['mer_id'] = $this->merchantId;
  100. return Json::successlayui(MerchantFlowingWater::getBillList($where));
  101. }
  102. /**
  103. *保存资金监控的excel表格
  104. */
  105. public function save_mer_order_bell_export()
  106. {
  107. $where = parent::getMore([
  108. ['start_time', ''],
  109. ['end_time', ''],
  110. ['nickname', ''],
  111. ]);
  112. $where['mer_id'] = $this->merchantId;
  113. MerchantFlowingWater::SaveExport($where);
  114. }
  115. }