AccumulatePointsLog.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
  8. // +----------------------------------------------------------------------
  9. // | Author: 萤火科技 <admin@yiovo.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types = 1);
  12. namespace app\store\model\user;
  13. use app\common\model\user\AccumulatePointsLog as AccPointsLog;
  14. /**
  15. * 用户余额变动明细模型
  16. * Class PointsLog
  17. * @package app\api\model\user
  18. */
  19. class AccumulatePointsLog extends AccPointsLog
  20. {
  21. /**
  22. * 获取日志明细列表
  23. * @return \think\Paginator
  24. * @throws \app\common\exception\BaseException
  25. * @throws \think\db\exception\DbException
  26. */
  27. public function getList($userId, $scene = 10)
  28. {
  29. // 当前用户ID
  30. // 获取列表数据
  31. return $this->where('user_id', '=', $userId)
  32. ->where('user_id', '=', $userId)
  33. ->where('scene', '=', $scene)
  34. ->order(['create_time' => 'desc'])
  35. ->paginate(15);
  36. }
  37. }