quanwei
2025-12-10 898043fc97d2ab8b793fd317a049b874ed207c6d
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
<?php
 
namespace app\api\model\plus\release;
 
use app\common\model\plus\release\Project as ProjectModel;
 
 
/**
 * 模型
 */
class Project extends ProjectModel
{
    /**
     * 获取提现明细
     */
    public function getList($user_id, $postdata)
    {
        $model = $this;
        if(!empty($postdata["keyword"])){
            $model = $model->where('name', 'like', '%'.$postdata["keyword"].'%');
        }
        if(!empty($postdata["category_id"])){
            $model = $model->where('category_id', '=', $postdata["category_id"]);
        }
        return $model->with(['category','user'])->where('is_delete', '=', 0)
            ->where('project_type', '=', $postdata["product_type"])
            ->where('status', '=', 1)
            ->where('is_show', '=', 1)
            ->where('user_id', '<>', $user_id)
            ->order(['create_time' => 'desc'])
            ->paginate($postdata);
    }  
 
}