['category_id', 'type_id', 'mer_name', 'credit_buy', 'status', 'commission_rate', 'service_phone','service_user', 'mer_money', 'financial_bank', 'financial_wechat', 'financial_alipay'], ]; } /** * @notes 获取商户列表列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/04/23 16:35 */ public function lists(): array { return Merchant::where($this->searchWhere) ->field(['mer_id', 'category_id', 'type_id', 'mer_name', 'credit_buy', 'settle_cycle', 'interest_rate', 'city_id', 'area_id', 'street_id', 'village_id', 'mer_address', 'mer_avatar', 'mark', 'commission_rate', 'service_phone','service_user', 'mer_money', 'financial_bank', 'financial_wechat', 'financial_alipay']) ->limit($this->limitOffset, $this->limitLength) ->order(['mer_id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取商户列表数量 * @return int * @author likeadmin * @date 2024/04/23 16:35 */ public function count(): int { return Merchant::where($this->searchWhere)->count(); } }