quanwei
2025-11-21 2d9362ae6f528f57e6133d5d80f0b633c24e8eb6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
 
namespace app\api\model\plus\lottery;
 
use app\common\model\plus\lottery\Record as RecordModel;
 
/**
 * Class GiftPackage
 * 记录模型
 * @package app\common\model\plus\giftpackage
 */
class Record extends RecordModel
{
    /**
     * 记录列表
     * @param $data
     */
    public function getList($data, $user)
    {
        $model = $this;
        return $model->alias('r')
            ->where('user_id', '=', $user['user_id'])
            ->field('r.*')
            ->order('r.create_time', 'desc')
            ->paginate($data);
    }
 
    /**
     * 记录列表
     * @param $data
     */
    public function getLimitList($limit)
    {
        $model = $this;
        return $model->alias('r')
            ->with(['user'])
            ->field('r.*')
            ->order('r.create_time', 'desc')
            ->limit($limit)
            ->select();
    }
}