31 lines
791 B
PHP
31 lines
791 B
PHP
<?php
|
|
/*
|
|
* @Descripttion:
|
|
* @version:
|
|
* @Author: kangkang
|
|
* @Date: 2020-10-22 16:13:41
|
|
* @LastEditors: Please set LastEditors
|
|
* @LastEditTime: 2020-12-03 16:28:11
|
|
*/
|
|
|
|
|
|
namespace app\agent\model;
|
|
|
|
use fastphp\base\Model;
|
|
|
|
class ProductAccount extends Model
|
|
{
|
|
protected $table = 'product_account';
|
|
|
|
/**
|
|
* 按照页数获取数据
|
|
* @param $fields 'id,count(1)...'
|
|
* @param $order 'id desc'/'id asc'
|
|
* @param $limit = '100' 限制查询100条
|
|
* $limit = '2,100' 查询第二页 100条数据
|
|
*/
|
|
public function getAgentListPage($where = [],$where_str = '', $fields = '*', $order = 'id desc', $limit = '50')
|
|
{
|
|
return $this->field($fields)->where($where)->where($where_str)->order($order)->limit($limit)->fetchAll();
|
|
}
|
|
} |