'integer', 'account_type' => 'integer', 'belong_id' => 'integer', 'pid' => 'integer', 'rank' => 'integer']; public static function list(array $param) { $model = (new self()); if (isset($param['account_type']) && $param['account_type'] != '') { $model = $model->where('account_type', $param['account_type']); } if (isset($param['belong_id']) && $param['belong_id'] != '') { $model = $model->where('belong_id', $param['belong_id']); } if (isset($param['type']) && $param['type'] != '') { $model = $model->where('type', $param['type']); } return $model ->select(["category_id", "category_name", "pid"]) ->get(); } }