CashController.php 656 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace ghs\controllers;
  3. use biz\sj\classes\CashClass;
  4. use common\components\util;
  5. class CashController extends BaseController
  6. {
  7. //客户列表 ssh 2019.11.30
  8. public function actionList()
  9. {
  10. $where = ['shopId' => $this->shopId];
  11. $list = CashClass::getCashList($where);
  12. util::success($list);
  13. }
  14. //申请提现 ssh 2021.3.14
  15. public function actionApply()
  16. {
  17. $shop = $this->shop;
  18. $txBalance = $shop['txBalance'] ?? 0.00;
  19. if ($txBalance <= 0) {
  20. util::fail('可提现余额不足');
  21. }
  22. CashClass::addApply($shop);
  23. util::complete();
  24. }
  25. }