['name'] ]; } /** * @notes 查看供应商分类列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author ljj * @date 2021/7/16 5:47 */ public function lists(): array { $lists = GoodsSupplierCategory::field('id,name,sort,create_time') ->where($this->searchWhere) ->limit($this->limitOffset, $this->limitLength) ->order(['sort'=>'asc','id'=>'desc']) ->select() ->toArray(); return $lists; } /** * @notes 查看供应商分类总数 * @return int * @author ljj * @date 2021/7/16 5:48 */ public function count(): int { return GoodsSupplierCategory::where($this->searchWhere)->count(); } }