Balance.php 694 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace app\data\controller\api\auth;
  3. use app\data\controller\api\Auth;
  4. use app\data\model\DataUserBalance;
  5. use think\admin\helper\QueryHelper;
  6. /**
  7. * 用户余额转账
  8. * Class Balance
  9. * @package app\data\controller\api\auth
  10. */
  11. class Balance extends Auth
  12. {
  13. /**
  14. * 获取用户余额记录
  15. */
  16. public function get()
  17. {
  18. DataUserBalance::mQuery(null, function (QueryHelper $query) {
  19. $query->withoutField('deleted,create_by');
  20. $query->where(['uuid' => $this->uuid, 'deleted' => 0])->like('create_at#date');
  21. $this->success('获取数据成功', $query->order('id desc')->page(true, false, false, 10));
  22. });
  23. }
  24. }