['name', 'py', 'dept_id', 'number', 'contacts', 'tel', 'add', 'data', 'more', 'sort'], ]; } /** * @notes 获取仓库列表列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/04/23 11:06 */ public function lists(): array { return Warehouse::where($this->searchWhere) ->field(['id', 'name', 'py', 'dept_id', 'number', 'contacts', 'tel', 'add', 'data', 'more', 'sort']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取仓库列表数量 * @return int * @author likeadmin * @date 2024/04/23 11:06 */ public function count(): int { return Warehouse::where($this->searchWhere)->count(); } }