CashController.php 707 B

1234567891011121314151617181920212223242526272829303132
  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. $shop['shopAdminId'] = $this->shopAdminId;
  19. $txBalance = $shop['txBalance'] ?? 0.00;
  20. if ($txBalance <= 0) {
  21. util::fail('可提现余额不足');
  22. }
  23. CashClass::addApply($shop);
  24. util::complete();
  25. }
  26. }