53 lines
1.2 KiB
PHP
53 lines
1.2 KiB
PHP
<?php
|
|
namespace app\common\repositories\system\merchant;
|
|
|
|
|
|
use app\common\dao\system\merchant\MerchantQuotaDao;
|
|
use app\common\repositories\BaseRepository;
|
|
|
|
|
|
class MerchantQuotaRepository extends BaseRepository{
|
|
|
|
public function __construct(MerchantQuotaDao $dao){
|
|
$this->dao = $dao;
|
|
}
|
|
|
|
/**
|
|
* Common: 列表获取
|
|
* Author: wu-hui
|
|
* Time: 2024/06/04 14:59
|
|
* @param array $params
|
|
* @param int $page
|
|
* @param int $limit
|
|
* @return array
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DbException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
*/
|
|
public function getList(array $params,int $page,int $limit){
|
|
$field = [
|
|
'm.mer_id',
|
|
'm.mer_name',
|
|
'm.merchant_type',
|
|
'mqr.title_brand_limit',
|
|
'mqr.title_brand_used',
|
|
'mqr.title_brand_total',
|
|
'mqr.other_brand_limit',
|
|
'mqr.other_brand_used',
|
|
'mqr.other_brand_total',
|
|
];
|
|
|
|
$query = $this->dao->searchList($params,$field);
|
|
$count = $query->count();
|
|
$list = $query->page($page,$limit)->select();
|
|
|
|
return compact('count','list');
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|