<?php
/*
 * @Descripttion: 
 * @version: 
 * @Author: kangkang
 * @Date: 2020-10-16 14:44:02
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2020-12-03 16:45:11
 */

namespace app\order\model;

use fastphp\base\Model;

class ProductOrder extends Model
{
    protected $table = 'product_order';

    /**
     * @description: 获取退款数据
     * @param {*}
     * @return {*}
     */
    public function openGetList($where = [], $fields = '*', $order = 'id desc', $limit = '50', $where2 = '')
    {
        return $this->field($fields)->where($where)->where($where2)->order($order)->limit($limit)->fetchAll();
    }

    public function getOpenCount($where = [],$where2 = '')
    {
        return $this->field('count(1) as count')->where($where)->where($where2)->fetch();
    }
}
