PointsLog.php 655 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\api\model\user;
  3. use app\common\model\user\PointsLog as PointsLogModel;
  4. /**
  5. * 用户余额变动明细模型
  6. * Class PointsLog
  7. * @package app\api\model\user
  8. */
  9. class PointsLog extends PointsLogModel
  10. {
  11. /**
  12. * 获取日志明细列表
  13. * @param $userId
  14. * @return \think\Paginator
  15. * @throws \think\exception\DbException
  16. */
  17. public function getList($userId)
  18. {
  19. // 获取列表数据
  20. return $this->where('user_id', '=', $userId)
  21. ->order(['create_time' => 'desc'])
  22. ->paginate(15, false, [
  23. 'query' => \request()->request()
  24. ]);
  25. }
  26. }