Recharge.php 793 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. class Recharge extends Model
  5. {
  6. public $page_info;
  7. /**
  8. * 充值列表
  9. * @access public
  10. * @author csdeshang
  11. * @param array $condition 条件
  12. * @param string $field 字段
  13. * @param number $page 分页
  14. * @param string $order 排序
  15. * @return array
  16. */
  17. public function getRechargeList($condition = array(), $field = '*', $page = 0, $order = 'recharge_id desc')
  18. {
  19. $user_list = $this
  20. ->alias('a')
  21. ->join('user b','b.user_id = a.user_id')
  22. ->where($condition)
  23. ->order($order)
  24. ->paginate($page, false, ['query' => request()->param()]);
  25. $this->page_info = $user_list;
  26. return $user_list->items();
  27. }
  28. }