<?php

namespace app\admin\model;

use think\Model;

class Order extends Model
{
    public function getOrdList($condition, $fileds = '*', $limit = 10)
    {
        if (empty($condition)) {
            $result = $this
                ->field($fileds)
                ->order('order_id','desc')
                ->paginate($limit);
        } else {
            $result = $this
                ->where($condition)
                ->order('order_id','desc')
                ->paginate($limit);
        }
        return $result;
    }

}
